%3CLINGO-SUB%20id%3D%22lingo-sub-1451018%22%20slang%3D%22en-US%22%3EUsing%20Microsoft%20R%20in%20your%20Solutions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1451018%22%20slang%3D%22en-US%22%3E%3CP%3EOne%20of%20the%20most%20distinctive%20features%20of%20Data%20Science%2C%20as%20opposed%20to%20working%20with%20databases%2C%20Business%20Intelligence%20or%20other%20data%20professions%2C%20is%20its%20heavy%20use%20of%20%3CA%20href%3D%22http%3A%2F%2Fwww.itl.nist.gov%2Fdiv898%2Fhandbook%2Fpmd%2Fsection1%2Fpmd14.htm%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Estatistical%20methods%3C%2FA%3E.%20At%20the%20first%20appearance%20of%20computing%20science%2C%20programs%20and%20algorithms%20were%20created%20to%20deal%20with%20the%20large%20amounts%20of%20calculations%20required%20in%20statistics.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOne%20of%20those%20implementations%20was%20the%20%3CA%20href%3D%22http%3A%2F%2Fect.bell-labs.com%2Fsl%2FS%2Fhistory.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%E2%80%9CS%E2%80%9D%20programming%20language%3C%2FA%3E%2C%20invented%20in%20the%20mid-1970%E2%80%99s.%20Based%20on%20those%20concepts%2C%20the%20%3CA%20href%3D%22https%3A%2F%2Fwww.r-project.org%2Fabout.html%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%E2%80%9CR%E2%80%9D%20environment%3C%2FA%3E%20was%20created%20by%20Ross%20Ihaka%20and%20Robert%20Gentleman%20in%20New%20Zealand%20under%20the%20GNU%20license.%20Interestingly%2C%20it%E2%80%99s%20written%20in%20C%2C%20Fortran%2C%20and%20R%20itself.%26nbsp%3B%20It%E2%80%99s%20one%20of%20the%20premier%20languages%20and%20environments%20you%20can%20use%20in%20Data%20Science.%20It%20has%20amazing%20language%20breadth%2C%20and%20it%20can%20be%20extended%20through%20the%20use%20of%20%E2%80%9Cpackages%E2%80%9D%20%E2%80%93%20there%20are%20SO%20many%20packages%20out%20there%2C%20your%20first%20task%20in%20using%20R%2C%20it%20seems%2C%20is%20learning%20what%20is%20already%20written%20so%20you%20can%20simply%20leverage%20it.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EIn%20future%20entries%20we%E2%80%99ll%20explore%20working%20with%20R%2C%20but%20for%20now%2C%20we%20need%20to%20install%20it.%20That%20really%20isn%E2%80%99t%20that%20difficult%2C%20but%20it%20does%20bring%20up%20something%20we%20need%20to%20deal%20with%20first.%20While%20the%20R%20environment%20is%20truly%20amazing%2C%20it%20has%20some%20limitations.%20It%E2%80%99s%20most%20glaring%20issue%20is%20that%20the%20data%20you%20want%20to%20work%20with%20is%20loaded%20into%20memory%20as%20a%20frame%2C%20which%20of%20course%20limits%20the%20amount%20of%20data%20you%20can%20process%20for%20a%20given%20task.%26nbsp%3BIt%E2%80%99s%20also%20not%20terribly%20well-suited%20for%20parallelism%20%E2%80%93%20many%20things%20are%20handled%20as%20in-line%20tasks.%20And%20if%20you%20use%20a%20package%20in%20your%20script%2C%20you%20have%20to%20ensure%20others%20load%20that%20script%2C%20and%20at%20the%20right%20version.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3E%3CA%20href%3D%22http%3A%2F%2Fwww.revolutionanalytics.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3EEnter%20Revolution%20Analytics%20%E2%80%93%20a%20company%20that%20changed%20R%20to%20include%20more%20features%20and%20capabilities%20to%20correct%20these%20issues%2C%20along%20with%20a%20few%20others.%3C%2FA%3E%20They%20had%20a%20great%20name%20in%20the%20industry%2C%20bright%20people%2C%20and%20great%20products%20%E2%80%93%20so%20Microsoft%20bought%20them.%20That%20means%20the%20%E2%80%9CRRE%E2%80%9D%20engine%20they%20created%20started%26nbsp%3B%20popping%20up%20in%20all%20sorts%20of%20places%2C%20like%20SQL%20Server%202016%2C%20Azure%20Machine%20Learning%2C%20and%20many%20others.%20The%20%E2%80%9Cstand-alone%E2%80%9D%20RRE%20products%20are%20still%20available%2C%20and%20at%20the%20current%20version.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EWhen%20Microsoft%20acquired%20Revolution%20R%20we%20updated%20and%20renamed%20it%20to%20Microsoft%20R%20-%20So%20that%E2%80%99s%20what%20we%E2%80%99ll%20install.%20Microsoft%20R%26nbsp%3B%3CSPAN%3Eis%20based%20on%2C%20and%20is%20100%25%20compatible%20with%20Open-Source%20R%2C%20which%20is%20one%20of%20the%20most%20widely%20used%20statistics%20software%20in%20the%20world.%20It's%20fully%20compatible%20with%20all%20packages%2C%20scripts%20and%20applications%20that%20work%20with%20R.%20It%20also%20includes%20additional%20capabilities%20for%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmran.microsoft.com%2Frro%23intelmkl1%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Eimproved%20performance%3C%2FA%3E%3CSPAN%3E%2C%26nbsp%3B%3C%2FSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fmran.microsoft.com%2Fdocuments%2Frro%2Freproducibility%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ereproducibility%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENote%20that%20the%20server%20versions%20of%20this%20product%20have%20also%20been%20re-written%20and%20rebranded%20as%20Microsoft%20Machine%20Learning%20Services%20-%20which%20can%20be%20installed%20stand-alone%20or%20alongside%20SQL%20Server.%20This%20server%20also%20includes%20a%20Python%20distribution%2C%20and%20several%20library%20and%20other%20enhancements.%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fmachine-learning-server%2Fwhat-is-machine-learning-server%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3ERead%20more%20about%20that%20here%3C%2FA%3E.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorBuck%20Woody_0%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH1%20id%3D%22toc-hId-471019887%22%20id%3D%22toc-hId-471019887%22%3EInstalling%20Microsoft%20R%20Open%3C%2FH1%3E%0A%3CP%3EThere%20are%20two%20versions%20of%20Microsoft%20R%20-%20one%20is%20the%20%22MRE%22%20(Microsoft%20R%20for%20Enterprise)%20and%20the%20other%20is%20%22MRO%22%20(Microsoft%20R%20Open).%20MRO%20is%20the%20free%20installation%20we'll%20deal%20with%20in%20this%20article.%26nbsp%3BWe%E2%80%99ll%20install%20on%20Windows%2C%20but%20Ubuntu%2C%20RedHat%2C%20and%20SuSE%20Linux%20is%20also%20supported.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ETo%20install%20MRO%2C%20click%20this%20link%3A%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D51205%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.microsoft.com%2Fen-us%2Fdownload%2Fdetails.aspx%3Fid%3D51205%2C%20download%20it%2C%20and%20run%20the%20installer.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EFor%20this%20installation%2C%20we%20can%20take%20all%20the%20defaults.%20I%20did%20add%20the%20icon%20to%20the%20quick%20launch%20area%2C%20since%20I%20plan%20to%20be%20in%20R%20quite%20a%20bit.%26nbsp%3B%20After%20we%20install%20the%20main%20RRO%20package%2C%20we%E2%80%99ll%20also%20want%20the%20enhanced%20math%20libraries.%20You%20can%20see%20that%20at%20the%20download%20site%2C%20just%20to%20the%20right%20of%20the%20installation%20for%20the%20Windows%20package%20we%20just%20launched.%20Click%20that%20%E2%80%9CMKL%E2%80%9D%20link%2C%20and%20once%20again%2C%20take%20all%20the%20defaults.%3C%2FP%3E%0A%3CDIV%20id%3D%22tinyMceEditorBuck%20Woody_5%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CH1%20id%3D%22toc-hId--1336434576%22%20id%3D%22toc-hId--1336434576%22%3EExploring%20the%20Tools%3C%2FH1%3E%0A%3CDIV%20id%3D%22tinyMceEditorBuck%20Woody_6%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EOnce%20installed%2C%20you'll%20find%20a%20new%20MRO%20folder%2C%20with%20an%20icon%20for%20the%20Microsoft%20RGUI.%20It's%20a%20rather%20primitive%20graphical%20tool%20for%20working%20with%20R%2C%20but%20it's%20fine%20to%20work%20with%20at%20the%20start.%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EOpening%20that%20tool%20brings%20us%20to%20the%20R%20Console%2C%20with%20MRO%20loaded%20up%20and%20ready.%20We%20can%20now%20run%20some%20simple%20commands%2C%20like%20these%3A%3C%2FP%3E%0A%3CPRE%3EX%20%26lt%3B-1%3A10%3C%2FPRE%3E%0A%3CPRE%3EX%3C%2FPRE%3E%0A%3CPRE%3Esummary(X)%3C%2FPRE%3E%0A%3CPRE%3Eplot(X)%3C%2FPRE%3E%0A%3CDIV%20id%3D%22tinyMceEditorBuck%20Woody_8%22%20class%3D%22mceNonEditable%20lia-copypaste-placeholder%22%3E%26nbsp%3B%3C%2FDIV%3E%0A%3CP%3EWe%E2%80%99ll%20get%20into%20what%20all%20this%20means%20in%20future%20posts%20%E2%80%93%20but%20that%20doesn%E2%80%99t%20stop%20you%20from%20taking%20a%20free%20class%20ahead%20of%20time%3A%20%3CU%3E%3CA%20href%3D%22https%3A%2F%2Fwww.datacamp.com%2Fcourses%2Fbig-data-revolution-r-enterprise-tutorial%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3Ehttps%3A%2F%2Fwww.datacamp.com%2Fcourses%2Fbig-data-revolution-r-enterprise-tutorial%3C%2FA%3E%3C%2FU%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3ENow%20that%20Microsoft%20R%20is%20installed%2C%20you%20can%20use%20other%20R%20Interfaces%20with%20it.%20One%20of%20the%20most%20popular%20is%3CA%20href%3D%22https%3A%2F%2Frstudio.com%2F%22%20target%3D%22_blank%22%20rel%3D%22noopener%20nofollow%20noopener%20noreferrer%20noopener%20noreferrer%22%3E%20R-Studio%20-%20you%20can%20learn%20more%20about%20that%20here.%3C%2FA%3E%3C%2FP%3E%0A%3CP%3E%26nbsp%3B%3C%2FP%3E%0A%3CP%3EYou%20can%20also%20use%20Microsoft%20R%20with%20%3CA%20href%3D%22https%3A%2F%2Fmarketplace.visualstudio.com%2Fitems%3FitemName%3DMikhail-Arkhipov.r%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20Studio%20Code%2C%20Azure%20Data%20Studio%3C%2FA%3E%2C%20or%20%3CA%20href%3D%22https%3A%2F%2Fdocs.microsoft.com%2Fen-us%2Fvisualstudio%2Frtvs%2F%3Fview%3Dvs-2017%22%20target%3D%22_blank%22%20rel%3D%22noopener%20noopener%20noreferrer%20noopener%20noreferrer%22%3EVisual%20Studio%20(all%20editions)%3C%2FA%3E.%20In%20future%20posts%20we'll%20examine%20more%20about%20working%20with%20R%20and%20data.%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-TEASER%20id%3D%22lingo-teaser-1451018%22%20slang%3D%22en-US%22%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Buck.jpg%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F197591i40C682281467147F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22Buck.jpg%22%20alt%3D%22Buck.jpg%22%20%2F%3E%3C%2FSPAN%3ER%20is%20a%20powerful%20data%20language%20with%20thousands%20of%20%22packages%22%20allowing%20you%20to%20extend%20its%20uses%20for%20Data%20Science%2C%20Advanced%20Analytics%2C%20Machine%20learning%20and%20much%20more.%20Microsoft%20has%20enhanced%20this%20language%20with%20a%20Distribution%20called%20%22Microsoft%20R%20Open%22.%20Read%20on%20to%20learn%20more%20about%20this%20powerful%20tool%20you%20can%20use%20stand-alone%2C%20or%20embedded%20in%20several%20Microsoft%20products.%3C%2FP%3E%3C%2FLINGO-TEASER%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1451018%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EData%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EData%20Science%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Microsoft

One of the most distinctive features of Data Science, as opposed to working with databases, Business Intelligence or other data professions, is its heavy use of statistical methods. At the first appearance of computing science, programs and algorithms were created to deal with the large amounts of calculations required in statistics.

 

One of those implementations was the “S” programming language, invented in the mid-1970’s. Based on those concepts, the “R” environment was created by Ross Ihaka and Robert Gentleman in New Zealand under the GNU license. Interestingly, it’s written in C, Fortran, and R itself.  It’s one of the premier languages and environments you can use in Data Science. It has amazing language breadth, and it can be extended through the use of “packages” – there are SO many packages out there, your first task in using R, it seems, is learning what is already written so you can simply leverage it.

 

In future entries we’ll explore working with R, but for now, we need to install it. That really isn’t that difficult, but it does bring up something we need to deal with first. While the R environment is truly amazing, it has some limitations. It’s most glaring issue is that the data you want to work with is loaded into memory as a frame, which of course limits the amount of data you can process for a given task. It’s also not terribly well-suited for parallelism – many things are handled as in-line tasks. And if you use a package in your script, you have to ensure others load that script, and at the right version.

 

Enter Revolution Analytics – a company that changed R to include more features and capabilities to c... They had a great name in the industry, bright people, and great products – so Microsoft bought them. That means the “RRE” engine they created started  popping up in all sorts of places, like SQL Server 2016, Azure Machine Learning, and many others. The “stand-alone” RRE products are still available, and at the current version.

 

When Microsoft acquired Revolution R we updated and renamed it to Microsoft R - So that’s what we’ll install. Microsoft R is based on, and is 100% compatible with Open-Source R, which is one of the most widely used statistics software in the world. It's fully compatible with all packages, scripts and applications that work with R. It also includes additional capabilities for improved performancereproducibility

 

Note that the server versions of this product have also been re-written and rebranded as Microsoft Machine Learning Services - which can be installed stand-alone or alongside SQL Server. This server also includes a Python distribution, and several library and other enhancements. Read more about that here.

 

Installing Microsoft R Open

There are two versions of Microsoft R - one is the "MRE" (Microsoft R for Enterprise) and the other is "MRO" (Microsoft R Open). MRO is the free installation we'll deal with in this article. We’ll install on Windows, but Ubuntu, RedHat, and SuSE Linux is also supported.

 

To install MRO, click this link: https://www.microsoft.com/en-us/download/details.aspx?id=51205, download it, and run the installer.

 

For this installation, we can take all the defaults. I did add the icon to the quick launch area, since I plan to be in R quite a bit.  After we install the main RRO package, we’ll also want the enhanced math libraries. You can see that at the download site, just to the right of the installation for the Windows package we just launched. Click that “MKL” link, and once again, take all the defaults.

 

Exploring the Tools

 

Once installed, you'll find a new MRO folder, with an icon for the Microsoft RGUI. It's a rather primitive graphical tool for working with R, but it's fine to work with at the start.

 

Opening that tool brings us to the R Console, with MRO loaded up and ready. We can now run some simple commands, like these:

X <-1:10
X
summary(X)
plot(X)
 

We’ll get into what all this means in future posts – but that doesn’t stop you from taking a free class ahead of time: https://www.datacamp.com/courses/big-data-revolution-r-enterprise-tutorial

 

Now that Microsoft R is installed, you can use other R Interfaces with it. One of the most popular is R-Studio - you can learn more about that here.

 

You can also use Microsoft R with Visual Studio Code, Azure Data Studio, or Visual Studio (all editions). In future posts we'll examine more about working with R and data.