Installing R Packages
Installing R packages
Users should install R packages for themselves locally. This documentation shows you how to install R packages locally (without root access) on Oscar.
If the package you want to install has operating-system-level dependencies (i.e. the package depends on core libraries), then we can install it as a module.
Installing an R package
First load the R version that you want to use the package with:
Start an R session
Note some packages will require code to be compiled so it is best to do R packages installs on the login node.
To install the package 'wordcloud':
You will see a warning:
Answer y
. If you have not installed any R packages before you will see the following message:
Answer y
. The package will then be installed. If the install is successful you will see a message like:
If the installation was not successful you will see a message like:
There is normally information in the message that gives the reason why the install failed. Look for the word ERROR
in the message.
Possible reasons for an installation failing include:
Other software is needed to build the R package, e.g. the R package
rgdal
needsgdal
so you have to domodule load gdal
A directory needs deleting from a previous failed installation.
Reinstalling R packages
To reinstall R packages, start an R session and run the update.packages() command
Removing an R package
Start an R session:
To remove the 'wordcloud' package:
Last updated