Many commonly used R packages are included in the base R installation available on HCC clusters,
stringr. However, users are able to install other packages in their
There are two options to install packages. The first is to run R on the
login node and run R interactively to install packages. The second is to
R CMD INSTALL command.
All R packages must be installed from the login node. R libraries are stored in user’s home directories which are not writable from the worker nodes.
module load R
module load R/3.5
install.packages()command to install desired packages. For example, to install the package
ggplot2use the command
Some R packages, require external compilers or additional libraries. If you see an error when installing your package you might need to load additional modules to make these compilers or libraries available. For more information about this, refer to the package documentation.
To install packages using
R CMD INSTALL the zipped package must
already be downloaded to the cluster. You can download package source
wget. Then the
R CMD INSTALL command can be used when
pointed to the full path of the source tar file. For example, to install
ggplot2 the following commands are used:
# Download the package source: wget https://cran.r-project.org/src/contrib/ggplot2_3.2.1.tar.gz # Install the package: R CMD INSTALL ./ggplot2_2.2.1.tar.gz
Additional information on using the
R CMD INSTALL command can be
found in the R documentation which can be seen by typing
within the R console.