Using R
Contents
Location
R is contained in the pkgsrc Modules, for example:
$module switch env env/2025Q1-gcc-openmpi module: unloaded env/2025Q1-gcc-openmpi Module for pkgsrc-devel 2025Q1 unloaded. module: loaded env/2025Q1-gcc-openmpi Module for pkgsrc-devel 2025Q1 loaded.$R --version R version 4.4.2 (2024-10-31) -- "Pile of Leaves" Copyright (C) 2024 The R Foundation for Statistical Computing ...
Installing R packages in
$USW
R packages should be installed in $USW (“User-installed
SoftWare”).
Steps:
- Create a directory in
$USW, for examplemkdir $USW/R-packages - Tell R to use that directory. This can achieved in two ways:
- in
~/.Rprofile.libPaths(paste(Sys.getenv("USW"), "R-packages", sep='/')) - in your shell profile (
~/.profileor~/.bash_profileor~/.bash_login)export R_LIBS_USER=$USW/R-packages
- in
High-Performance- and Parallel Computing with R
A starting point for High-Performance- and Parallel Computing with R is the Wikibook on R Programming:
- https://en.wikibooks.org/wiki/R_Programming/Profiling_R_code
- https://en.wikibooks.org/wiki/R_Programming/Parallel_computing_with_R
Keep in mind that independent single-core task can processed in parallel with the RRZ tool jobber.