Missing Libraries With SQL Server R Services

Kevin Feasel

2016-08-15

R

Tomaz Kastrun has a script to check and install missing packages in SQL Server R Services code:

Result in this case will be successful with correct R results and sp_execute_external_script will not return error for missing libraries.

I added a “fake” library called test123 for testing purposes if all the libraries will be installed successfully.

At the end the script generated xp_cmdshell command (in one line)

This is a rather clever solution to a problem which I’d rather not exist.  There really ought to be a better way for authorized users programmatically to install packages.

Related Posts

Reviewing Word Associations With R

Julia Silge does some exploratory analysis on the Small World of Words project: The Small World of Words project focuses on word associations. You can try it out for yourself to see how it works, but the general idea is that the participant is presented with a word (from “telephone” to “journalist” to “yoga”) and is then […]

Read More

Using ggplot And plotly To Visualize Multivariate Data

Sebastian Sauer shows us a few techniques for visualizing multivariate data, using ggplot2 in some cases and plotly in others: Plotting univariate (sampled) normal dataWell, that’s obvious.d %>% ggplot(aes(x = X1)) + geom_density() It gets much less obvious from there.  It was also interesting learning about ggplotly, a function which translates ggplot2 visuals to plotly visuals.

Read More

Categories

August 2016
MTWTFSS
« Jul Sep »
1234567
891011121314
15161718192021
22232425262728
293031