Spack is a tool which allows you to install your own version of some software.
Below xyz is your group name and abc is your userid.
First get an interactive build node.
For ikt.hyak or mox.hyak
srun -p build --time=4:00:00 --mem=100G --pty /bin/bash
Make a directory for spack:
git clone https://github.com/llnl/spack.git
Below command lists the available spack packages:
Below command prints more information about the r package
spack info r
Below command installs version 3.4.1 of the r package:
spack install email@example.com
After above command completes, R 3.4.1 will be installed at a path like below. Below example is for ikt. For mox, the centos version will be 7 and the gcc version will be different.
You can access this newly installed R by below steps:
You can also put below directory in your PATH and then use R 3.4.1 by just using the command R:
Below are more details: