Using R in the institute
R is a programming language with easily installable extensions (a.k.a. "libraries" a.k.a. "packages").
Permanent Link:
Using R in the institute
Permanent Link:
Multiple releases
Permanent Link:
Several R releases are provided in parallel--you
have to select beforehand. Up to including Linux platform generation 6, R was installed directly on workstations and computer servers while more recent releases could be selected explicitly. Since this caused confusion, R is no longer installed on workstations but has to always be selected explicitly.
- To simply run the the latest R release available:
user@host >
R+
- This is not advised if you need stable results for your computations.
- The latest R release will change from time to time.
- To identify the latest R release once and use it explicitly for whenever you run R:
-
user@host>
R+ --versions
- The latest available release is marked "default". Remember it (e.g.
4.2.0
).
- Run the respective release explicitly:
user@host>
R+ --version 4.2.0
- Upon failure of running a specified R release,
R+
won't continue but will fail hard to ensure you'll only do computations with your intended release version.
A Graphical environment
Permanent Link:
RStudio is available on all institute computers. It works like this:
- To do CPU intensive computations, select a compute server first:
user@host >
getserver -sL
- Select an R release. Example:
user@host >
R+ --version 4.2.0
- Run RStudio via the
rstudio
command.
- This can be combined. Example:
user@host >
R+ --version 4.2.0 rstudio
Package management
Permanent Link:
R+ used to just trust R to download, compile and install packages into the correct location. However, R doesn't know about multiple software platform generations being used with the same user account (e.g. G6 and G7). The R+ wrapper now has two modes:
- Original R behavior of selecting package locations. This behavior has a serious downside: When moving to a new software platform, your libraries might stop working since system libraries changed.
- Software platform aware behavior. R will keep a separate set of installed libraries per tuple (Software platform generation, R major release number, R minor release number). Example tuple: (G7,4,2) for R 4.2.1 (or R 4.2.2 or R 4.2.5) on generation 7 computers.
In short: You want that behavior.
R+ tries to enable the platform aware behavior. These conditions have to be satisfied:
- You have a personal software folder. If you don't, create one here.
- There are NO packages currently installed in the respective original location.
If you're willing to re-install the packages, you're currently using, the easiest way to achieve that is to remove the R
folder in your home directory. If you're unsure, rename it. If you removed it and regret it later, write a ticket and ask IT to restore if from backup.
R+ will test all conditions on startup and switch to software platform aware behavior, if possible. It will fallback to original behavior, if not all the conditions are satisfied.