Local R Packages
To install R packages without root access:
Create a file .Renviron in our home folder with the line
You may have to create the folder under your home directory:
Whenever you start R, the directory ~/Rpackages/ is added to the list of places to look for R packages and we can simply install new ones through the R command line:
should install it in the custom directory. You can use the “work” location to share these with your group (substituting your group name),
If you use different versions of R for different purposes, you can add to the library folder a %V which R will substitute with the version number.
Relevant R documentation