Using R on ARC

To use R on the ARC systems you simply need to load the latest R environment module, in this example version 3.5.3 - it can be loaded using the following command:
module load R/3.5.3
The base install has many popular R packages installed. It is possible that you will need access to packages which are not installed in the central repository. You can install R libraries in an R library repository within your storage area (e.g. $HOME or $DATA) please see below.
Please note: Some R libraries depend on the existence of non-R applications or other shared binaries. Attempting to install an R library with binary dependencies may fail. In this case please contact the ARC team and we will install the library and its dependencies for you centrally. 

Installing packages into your own R library

In order to use your own R library repository, you need to define an environment variable named "R_LIBS" containing the path to your local packages (this will need to be available each time you intend to use your local library, so you may wish to place it in your $HOME/.bash_profile file) :
export R_LIBS=$HOME/R_Libs
You can then create this folder (Note: this only needs to be done once):
mkdir $R_LIBS
Once this is done you can run the install.packages command from within R to install into this library - or indeed follow the instructions given for a particular package.

If your package needs top use git to be installed, then before running R type:

module load git

Additionally, you may find you need to use the http URL protocol rather than https for some repositories.

You can submit a number of R jobs from the login servers. To run R on parallel machines see the relevant section on our help pages: