R is a programming language for statistics and data analysis. It has become very popular lately, particularly in social sciences, life sciences, education, pharmaceuticals, finance, etc.
Most MCSR systems have a system R installed that may be suitable for some purposes. However, serious users will want to load one of the R modules available. The most recent version of R can always be loaded by running:
module load R
R 4.0.3 is the most recent R available on all MCSR systems. We try to keep a standard set of packages installed:
Installing R modules
Users can always request that R modules be installed by MCSR staff. This is usually the best option if a group of users will be using the same module. However, users can always install modules by themselves in their home directory.
To install a library in your home directory, first ensure that you have the appropriate R module loaded. Then, run the following command from inside R:
package_name is the name of the package you’d like to install. R will note that you do not have permission to write to the global R library and ask if you’d like to create an R directory in your home directory. It will then install the package and any dependencies.
If you find that an R package you installed is suddenly not there, make sure you’re on the correct system and that you’re using the correct version of R. If a new version of R has been installed, you’ll need to load the older version of R or reinstall your package.