SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Getting a New R Package–#SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

I was trying to test an R script the other day and got this:

> library(randomForest)
Error in library(randomForest) : 
  there is no package called ‘randomForest’

A common error if you have just a base R installation. In my case, I’d installed R Studio, but nothing else. I knew that many packages are installed at CRAN, but I’d never gotten one. So I did.

The first step was a quick google for syntax. In this case, r-bloggers.com had a nice short piece. The install.packages() function is used.

I decided to just try it. In may case, I was happy to use the defaults for now. I ran:

> install.packages("randomForest")
Installing package into ‘E:/Documents/R/win-library/3.3’
(as ‘lib’ is unspecified)
trying URL 'https://mran.revolutionanalytics.com/snapshot/2016-11-01/bin/windows/contrib/3.3/randomForest_4.6-12.zip'
Content type 'application/zip' length 177208 bytes (173 KB)
downloaded 173 KB

package ‘randomForest’ successfully unpacked and MD5 sums checked

The downloaded binary packages are in

After that, my library() function ran fine.

Filed under: Blog Tagged: R Language, SQLNewBlogger, syndicated

The Voice of the DBA

Steve Jones is the editor of SQLServerCentral.com and visits a wide variety of data related topics in his daily editorial. Steve has spent years working as a DBA and general purpose Windows administrator, primarily working with SQL Server since it was ported from Sybase in 1990. You can follow Steve on Twitter at twitter.com/way0utwest


Leave a comment on the original post [voiceofthedba.com, opens in a new window]

Loading comments...