Installing a new R release and a bundle of default user packages is streamlined with some scripts.
Installing R
Make a new directory. It is strongly suggested, to follow the template /sw/viz/R/R-4.0.2/skl. Copy the installation scripts into this directory. Do not forget, other members of the sw-group may need to install here too.
Codeblock $ cd /sw/viz/R/R-4.0.2/skl $ cp ../../scripts/* . $ chmod g+rwX *
Edit the script getR and update the version number.
...
Run getR. This downloads the requested version of R, inflates und unpacks the tar-file and renames the source directory into build.
...
Note, if you download otherwise, please rename the R-directory into build, if you want to use the script install_R.
Codeblock $ ./get_R
- Check or edit the script install_R. You may change there:
- the default compiler to be used for building R and R packages. This compiler needs to be compatible with the compiler used for external packages like netcdf, openmpi, magick etc.
- the options for running configure
- compiler options, especially the degreee of optimisation and rpath. These options will be part of the default settings to be used by Rscript when building packages.
Run install_R. The script will stop several time requesting ENTER to continue. This helps to see, if the configureation, compilation and all checks are finished with reasonable output. Note, the script changes permissions in the end to allow other members of the sw-group to install there too.
Codeblock $ ./install_R