Find installed R packages on your Microsoft R Server

Want to find out what R libraries you have available in your SQL Server 2016 environment?

2016-06-16 10_28_29-microsoft r server - Google Search

Run the following scripts to find out how many R Libraries you have available for your R Server in SSMS:

EXECUTE sp_execute_external_script
          @language = N'R'
         ,@script = N'installpackages <- nrow(installed.packages());
                    OutputDataSet <-;'
         ,@input_data_1 = N'SELECT 1 AS NOF_LIBRARIES'
                  (NOF_Libraries int)

And all their names along with couple of additional information (version, dependency,…)

EXECUTE sp_execute_external_script
 ,@script = N'installpackages <-installed.packages();
             PackageName <- installpackages[,1];
             PackageVersion <- installpackages[,3];
             PackagePath <- installpackages[,2];
             PackageDepend <- installpackages[,6];
             OutputDataSet <-,PackageVersion,PackageDepend,PackagePath));'
,@input_data_1 = N'SELECT 1 as col'
                   (PackageName NVARCHAR(50)
                   ,PackageVersion NVARCHAR(50)
                   ,PackageDepend NVARCHAR(250)
                   ,PackageDepend NVARCHAR(500))

Happy R-SQLing 😉

Posted in Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Follow TomazTsql on

Tomaz doing BI and DEV with SQL Server and R

attaining enlightenment with sql server, .net, biztalk, windows and linux

SQL DBA with A Beard

He's a SQL DBA and he has a beard

DB NewsFeed

Matan Yungman's SQL Server blog

Reeves Smith's SQL & BI Blog

A blog about SQL Server and the Microsoft Business Intelligence stack with some random Non-Microsoft tools thrown in for good measure.

SQL Server

for Application Developers

Clocksmith Games

We make games we love to play

Business Analytics 3.0

Data Driven Business Models

SQL Database Engine Blog

Tomaz doing BI and DEV with SQL Server and R

Search Msdn

Tomaz doing BI and DEV with SQL Server and R


Tomaz doing BI and DEV with SQL Server and R

Ms SQL Girl

Julie Koesmarno's Journey In Data, BI and SQL World


R news and tutorials contributed by (750) R bloggers

Data Until I Die!

Data for Life :)

Paul Turley's SQL Server BI Blog

sharing my experiences with the Microsoft data platform, SQL Server BI, Data Modeling, SSAS Design, Power Pivot, Power BI, SSRS Advanced Design, Power BI, Dashboards & Visualization since 2009

Grant Fritchey

Intimidating Databases and Code

Madhivanan's SQL blog

A modern business theme

Alessandro Alpi's Blog

SQL Server, Azure and .net in a nutshell :D

Paul te Braak

Business Intelligence Blog

Sql Server Insane Asylum (A Blog by Pat Wright)

Information about SQL Server from the Asylum.

Gareth's Blog

A blog about Life, SQL & Everything ...

SQLPam's Blog

Life changes fast and this is where I occasionally take time to ponder what I have learned and experienced. A lot of focus will be on SQL and the SQL community – but life varies.

William Durkin

William Durkin a blog on SQL Server, Replication, Performance Tuning and whatever else.

$hell Your Experience !!!

As aventuras de um DBA usando o Poder do $hell

%d bloggers like this: