R (statistical software)
R (statistical software) requires an environment module
In order to use R (statistical software), you must first load the appropriate environment module:
module load R
This application is available in Open OnDemand.
The "R" Tool is an open-source, popular, and fully-featured statistical application and programming platform.
R Studio in Open OnDemand#
For graphical access to R, first log onto our Open OnDemand HPC Web portal.
- Click on the "Interactive Apps" menu item.
- Select "RStudio 2023" or "RStudio Server 2023" from the list of available applications.
- Specify the desired R version and specify any additional modules needed.
- R Version: Select the specific R release version you require for your job execution.
- Extra Module (Optional): This option allows you to select a specific version of an additional environment module if your project relies on add-ons or MEX files requiring a particular compiler version for compatibility.
- Click "Launch" to queue your job.
- When your interactive job has started, click Launch.
- A new tab will open, and the Spyder Application will launch shortly after.
R on the HPC Terminal#
There are multiple versions of R installed on HPC. To see the full list, connect to any login node, and run the following command:
You will see output similar to the following:
To load a version of R besides the default, append the version number to the module name:
Submit R jobs to the HPC#
To use "R" on HPC, append CMD BATCH
to the executable line in your submit script. For example:
Install R packages in your home directory#
If you need a package in R that is not included with the base R installation, you can install it yourself in your home directory. This provides the most flexibility, since you can install whichever R packages you need without administrative privileges on our system. Here's how to do it:
Parallel computing with R#
There are several powerful parallel processing libraries for R. This capability is vital for leveraging the full power of the HPC for your research. Some of the more popular libraries are as follows:
- parallel - Single node, multicore jobs
- doParallel - Single node, multicore jobs
- future.batchtools - Multiple node jobs
Submitting R jobs to the cluster#
More information about job submissions is available on this website.