User Tools

Site Tools


Table of Contents


R is a free software environment for statistical computing and graphics.



See which versions are available:

$ module avail R

Load one version into your environment and run it:

$ module load R/4.2
$ R

Use installed.packages() to check the list of packages installed in the ILRI environment by default. Here is a good resource on installing R packages into user libraries if you need other packages.


Notes from the sysadmin during installation.

First, compile the main R application:

$ cd /tmp
$ wget
$ tar xf R-4.2.0.tar.gz 
$ cd R-4.2.0
$ ./configure --enable-R-shlib --prefix=/export/apps/R/4.2
$ chrt -b 0 make -j4
$ sudo mkdir /export/apps/R/4.2
$ sudo chown aorth:aorth /export/apps/R/4.2
$ make install

Then install some common libraries used by our users because some of them are quite complicated, and installing them globally saves tens of thousands of header files and libraries being installed into user libraries anyways:

$ /export/apps/R/4.2/bin/R
# > Sys.setenv(MAKEFLAGS = "-j2") # didn't try
> options(Ncpus = 4) # This does 4 parallel package installs
> install.packages('sf', repo='')
> install.packages("hierfstat", repos="")
> install.packages("adegenet", repos="")
> install.packages("BiocManager", repos="")
> install.packages("poppr", repos="")
> install.packages("vcfR", repos="")
> install.packages("devtools", repos="")
> library(devtools)
> install_github("HenrikBengtsson/TopDom")
> install_github("lucidif/HiCeekR", repos=BiocManager::repositories())
> q()
$ sudo chown -R root:root /export/apps/R/4.2
r-software.txt · Last modified: 2022/05/27 06:32 by aorth