|
1 | | -# R libraries |
| 1 | +# R packages |
2 | 2 |
|
3 | | -Please keep in mind, that this is not a general manual |
4 | | -abut installing `R` libraries, but only system specific information about self |
5 | | -installed R libraries at {{ hpcinfra }}. |
| 3 | +!!! note |
| 4 | + Please keep in mind, that this is not general documentation |
| 5 | + about installing `R` packages, but specific information about |
| 6 | + self-installed R packages at the {{ hpcinfra }}. |
6 | 7 |
|
7 | | -Our infrastructure contains different CPU architectures, that are |
| 8 | +The {{ hpcinfra }} contains different generations of CPUs, with different microarchitectures, that are |
8 | 9 | not necessarily compatible with each other. Additionally, we have |
9 | 10 | multiple versions of `R` installed with different versions of toolchains, and by default, |
10 | 11 | self installed libraries are installed in separate directories based only |
11 | | -on `R` major and minor versions. |
| 12 | +on `R` major and minor versions (only using `x.y` for R version `x.y.z`). |
12 | 13 |
|
13 | | -In this way, you might use self installed `R` libraries on incompatible architectures and/or |
14 | | -compiled with incompatible toolchains, which might lead to hangs or other types of errors. |
| 14 | +In this way, you might use self-installed `R` packages on incompatible CPU microarchitectures and/or |
| 15 | +compiled with incompatible toolchains, or for a different major version of the operating system, |
| 16 | +which might lead to hangs or other types of errors. |
15 | 17 |
|
16 | | -When you load a centrally installed `R` module we make sure that self installed libraries |
17 | | -will be installed to an operational system, architecture, toolchain, and `R` version |
18 | | -dependent directory. The location of this directory by default is |
19 | | -(by setting `R_LIBS_USER` environmental variable to) |
| 18 | +Since end of February 2025, we make sure that `R` packages that you install yourself will be installed |
| 19 | +in a directory that is specific to the operating system version, CPU microarchitecture, toolchain, |
| 20 | +and `R` version that is being used. The location of this directory by default is |
| 21 | +(by setting `$R_LIBS_USER` environment variable to) |
20 | 22 | `$VSC_DATA/local_R_LIBS/$VSC_OS_LOCAL/$VSC_ARCH_LOCAL/<R version>-<toolchain>`. |
21 | 23 |
|
| 24 | +### Controlling the location for self-installed R packages |
| 25 | + |
22 | 26 | If you would like to have another location (for example you are using a central location |
23 | | -in your VO), you should set the environmental variable `R_LIBS_BASEDIR` to the desired location |
| 27 | +in your Virtual Organisation), you should set the environment variable `$R_LIBS_BASEDIR` to the desired location |
24 | 28 | *before* you load any centrally installed `R` module. In this case, the location of the |
25 | | -directory for self installed `R` libraries will be |
| 29 | +directory for self-installed `R` packages will be |
26 | 30 | `$R_LIBS_BASEDIR/local_R_LIBS/$VSC_OS_LOCAL/$VSC_ARCH_LOCAL/<R version>-<toolchain>`. |
27 | 31 | If this directory is not writable, you can still be able to use already installed |
28 | | -`R` libraries from that location, but you will not be able to install `R` libraries |
| 32 | +`R` packages from that location, but you will not be able to install `R` packages |
29 | 33 | yourself. |
30 | 34 |
|
31 | | -You can always check the default location(s) of `R` libraries by issuing `.libPaths()` command |
| 35 | +You can always check the default location(s) of `R` packages by issuing `.libPaths()` command |
32 | 36 | in `R`. This command will show the library locations ordered by their priorities. |
33 | 37 |
|
34 | | -Please be aware that if you have installed an `R` libraries yourself in the past, you might have to |
| 38 | +Please be aware that if you have installed an `R` packages yourself in the past (before end of February 2025), you might have to |
35 | 39 | reinstall those if you want to use them: |
36 | 40 | - on a different cluster |
37 | 41 | - with a different version of `R` |
|
0 commit comments