Skip to main content

R Packages Notes

We tend to install R with all the packages, so if you're finding one make sure that you are seeing the default install path. 

To see the installed packages (from an R prompt):

> installed.packages();

To find just one:

> find.package("ggplot2")
[1] "/usr/lib64/R/library/ggplot2"
> find.package("ggplot3")
Error in find.package("ggplot3") : there is no package called ‘ggplot3’

To see the library paths:

> .libPaths()
[1] "/usr/lib64/R/library"                               
[2] "/usr/share/R/library"    


To add library paths:

libPaths(c( .libPaths(), "/usr/local/lib/R/site-library", "/usr/lib/R/site-library" ,"/usr/lib/R/library"))