Currently the cluster has two versions of R installed; the latest 3.5 and
an earlier 3.4.4. If you just type “R” you will get the default version
as that is in the path
$ R --version R version 4.0.2 (2020-06-22) -- "Taking Off Again"
R > help(Startup)
When R starts (with default options), it loads the .Rprofile and .Renviron files in the working directory or user’s home directory.
It is best to install the R packages that you require into your own local R library.
By default R will install local R packages under the directory specified by the “R_LIBS_USER”
environment variable. You can check what this is within an R session with
The default setting for this is
Under there you will find a directory for each version of R.
Some users prefer to set their own directory for R packages. A
will override any defaults.
Note that R is usually forwards-compatible with libraries installed from previous versions of R but not always.
$ mkdir ~/R/library $ echo 'R_LIBS_USER="~/R/library"' > $HOME/.Renviron
You can also install to a specific location using the “lib” option to the install.packages function.
$ R > install.packages("name-of-your-package", lib="~/R/library")
This site https://www.statmethods.net/interface/help.html has some quick help on basic R topics. It’s a useful starting place.
Efficient R programming – This is the online version of the O’Reilly book “Efficient R Programming”.
If you wish to find out if the not yet released versions have changed documentation then read http://stat.ethz.ch/R-manual/ and from there you can follow the “R-devel” link to find the docs for the next version of R. You can also go directly to Packages in the standard library and Documentation for package ‘base’ version.
Finally if you really do like R you should read the The R Inferno (PDF) by Patrick Burns. This is written in a satirical style after Dante’s Inferno.