R on HPC Systems
What is R?
R is a free and open source programming language and software environment for statistical computing and graphics (see https://www.r-project.org/).
Getting Started
Different release versions of R are installed on (most) LRZ HPC systems. All of them are configured with X11 support (for plotting and displaying graphics) and specific versions linked to Intel's Math Kernel Library (MKL) are available.
All versions can be accessed by using the environment module system (see Environment Modules). To search for all available versions use:
$ module available r
Please note: going forward, all modules providing (the latest) versions of R follow a unified naming scheme and R is represented by a lowercase letter, e.g. r/3.6.3-gcc8-mkl
(see Environment Modules)
To load/activate a specific version of R, use the full module name, e.g.:
$ module load r/3.6.3-gcc8-mkl
Afterwards, the R interpreter can be started using:
$ R
R Package Management
Any (additional) R packages have to be installed into package libraries. These are (just) directories on the file system with subdirectories for each installed package. The installations of R provided by the module system contain only a standard set of R packages. On multiuser systems, regular users may not add/install packages directly into this default system library.
Individual users can create (one or more) additional user libraries. If no suitable one exists, R will prompt you to define a user library when installing packages for the first time.
On GNU/Linux-based systems (most) "add-on" R packages will be compiled from source. For this to work, required compilers, tools and additional dependencies must be available on the system. For best compatibility use the same compiler that has been used for building R itself when installing additional packages. This is indicated by a corresponding suffix in the module name. Currently, this is typically a fairly recent version of the GNU Compiler Collection (GCC), e.g. GCC 8 for r/3.6.3-gcc8-mkl
. Make sure to properly set up your environment before starting R and installing add-on packages:
$ module unload intel-mpi $ module unload intel $ module load gcc
Support and Additional Ressources
In case of any issues with the usage of R on LRZ HPC Systems or any arising questions, please feel free to contact the LRZ Servicedesk
Documentation covering different aspects of working with R can be found on the official project site: https://cran.r-project.org/manuals.html