<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/tutorial-azure-data-lake-analytics-with-r/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://blog.revolutionanalytics.com/2017/10/adla-with-r.html"> Revolutions</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<div>
<p>The <a rel="nofollow" href="https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-overview" target="_blank">Azure Data Lake</a> store is an Apache Hadoop file system compatible with HDFS, hosted and managed in the Azure Cloud. You can store and access the data within directly via the API, by connecting the filesystem directly to <a rel="nofollow" href="https://docs.microsoft.com/en-us/azure/hdinsight/hdinsight-hadoop-introduction" target="_blank">Azure HDInsight</a> services, or via <a rel="nofollow" href="https://docs.microsoft.com/en-us/azure/data-lake-store/data-lake-store-compatible-oss-other-applications" target="_blank">HDFS-compatible open-source applications</a>. And for data science applications, you can also access the data directly from R, as this <a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial" target="_blank">tutorial explains</a>. </p>
<p>To interface with Azure Data Lake, you'll use <a rel="nofollow" href="https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-get-started" target="_blank">U-SQL</a>, a SQL-like language extensible using C#. The <a rel="nofollow" href="https://docs.microsoft.com/en-us/azure/data-lake-analytics/data-lake-analytics-u-sql-r-extensions" target="_blank">R Extensions for U-SQL</a> allow you to reference an R script from a U-SQL statement, and pass data from Data Lake into the R Script. There's a 500Mb limit for the data passed to R, but the basic idea is that you perform the main data munging tasks in U-SQL, and then pass the prepared data to R for analysis. With this data you can use any function from base R or any R package. (Several common R packages are provided in the environment, or you can upload and install other packages directly, or use the <a rel="nofollow" href="https://mran.microsoft.com/package/checkpoint/" target="_blank">checkpoint package</a> to install everything you need.) The R engine used is R 3.2.2.</p>
<p>The tutorial walks you through the following stages:</p>
<ul>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise1" target="_blank">Exercise 1</a> – Inline R code.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-2---deploy-r-script-as-resource" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise2" target="_blank">Exercise 2</a> – Deploy R script as resource.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-3---check-the-r-environment-in-adla-install-the-magrittr-package" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise3" target="_blank">Exercise 3</a> – Check the R environment in ADLA. Install the magrittr package.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-4---using-checkpoint-to-create-a-zip-file-containing-required-packages-and-all-the-dependencies-demonstrate-how-to-deploy-and-use-dplyr-package" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise4" target="_blank">Exercise 4</a> – Using checkpoint to create a zip file containing required packages and all the dependencies. Demonstrate how to deploy and use dplyr package.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-5---understanding-how-partitioning-works-in-adla-specifically-the-reduce-operation" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise5" target="_blank">Exercise 5</a> – Understanding how partitioning works in ADLA. Specifically the REDUCE operation.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-6---about-rreturntype-as-charactermatrix" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise6" target="_blank">Exercise 6</a> – About rReturnType as “charactermatrix”.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-7---save-the-trained-model-deploy-trained-model-for-scoring" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise7" target="_blank">Exercise 7</a> – Save the trained model. Deploy trained model for scoring.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-8---use-r-scripts-as-combiners-using-combine-and-extensionrcombiner" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise8" target="_blank">Exercise 8</a> – Use R scripts as combiners (using COMBINE and Extension.R.Combiner).</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#exercise-9---use-rxdtree-from-revoscaler-package" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Exercise9" target="_blank">Exercise 9</a> – Use rxDTree() from RevoScaleR package.</li>
<li><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial#advanced------more-complex-examples" target="_blank"></a><a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Tutorial/Advanced" target="_blank">Advanced</a> – More complex examples.</li>
</ul>
<p>To get started with the tutorial, check the link below for the prerequisites and then hop on over to <a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/tree/master/Tutorial" target="_blank">Github for the complete walkthrough</a>. You can also follow along with <a rel="nofollow" href="https://github.com/Azure/ADLAwithR-GettingStarted/blob/master/Azure%20CLI/Tutorial_with_Jupyter_Notebook.ipynb" target="_blank">this Jupyter notebook</a>.</p>
<p>Cortana Intelligence Gallery: <a rel="nofollow" href="https://gallery.cortanaintelligence.com/Tutorial/Getting-Started-with-using-Azure-Data-Lake-Analytics-with-R-A-Tutorial" target="_blank">Getting Started with using Azure Data Lake Analytics with R – A Tutorial</a></p>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://blog.revolutionanalytics.com/2017/10/adla-with-r.html"> Revolutions</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/pzrAPlwogYw" height="1"></a></div>