Beginners coming to SQL Server R Services would find it a bit difficult to understand the integration of R and SQL Server. Bob Ward has provided a great insight into the SQL Server R Services Architecture in the recently concluded #SSGAS2016 summit.
When I started exploring this feature, the first bottleneck I faced was the installation of additional packages like ggplot2 or caret to R Services.
The following is the illustration of what happens when we try to load a library that is not yet available in SQL Server R Services
Steps thru R Studio
- Install R Studio on the same machine as that of SQL Server Database Engine
- When R Studio is opened for the first time, it prompts for selection of existing R installation to work with
- The simplest way is to select the R Services folder that is in SQL Server Program Files folder as below
4. Open R Studio and run install.packages(“ggplot2”)
Thats all it takes….
Please note that this assumes that internet connectivity is available on the SQL Server instance
For additional options, please check out the MSDN Post
MSDN now has enhanced documentation on Getting Started with SQL Server R Services with topics including the architecture of R Services and lots of samples.
Hope you find this blog post useful and start on the exciting Data Science journey of R integration with SQL Server