Jupyter and R Troubleshooting

Tags dcs R

Error loading packages

Example:  Error in library(ggplot2): there is no package called ‘ggplot2’

The most common issue when loading R packages in Jupyter is that package isn't installed in the correct location. 

Run Library() to see the location of the library and what packages are installed

Common locations of the library are:

  • /Users/username/Library/R/3.2/library
  • /Library/Frameworks/R.framework/Versions/3.2/Resources/library

 

If you don't see your package listed it isn't installed in the R library that Jupyter is using. 

Open R or R studio and run the following command changing PACKAGENAME to to the package you're trying to install and /Path/to/Library to the location of your library (found when you ran Library() )

install.packages("PACKAGENAME", lib="/Path/to/Library")

Example: install.packages("ggplot2", lib="/Users/username/Library/R/3.2/library/")

 

Details

Article ID: 29256
Created
Thu 4/13/17 9:37 AM