|
| 1 | +# R libraries |
| 2 | + |
| 3 | +Please keep in mind, that this is not a genral manual |
| 4 | +abut installing `R` libraries, but only system specific information about self |
| 5 | +installed R libraries at {{ hpcinfra }}. |
| 6 | + |
| 7 | +Our infrastructure contains different CPU arcitectures, that are |
| 8 | +not neccesarily compatible with each other. Additionally, we have |
| 9 | +multiple versions of `R` installed with different versions of toolchains, and by default, |
| 10 | +self installed libraries are installed in separate directories based only |
| 11 | +on R major and minor versions. |
| 12 | + |
| 13 | +In this way, you might use self installed R libraries on incopatible architectures and/or |
| 14 | +compiled with incompatible toolchains, which might lead to hangs or other types of errors. |
| 15 | + |
| 16 | +When you load a centrally installed `R` module we make sure that self installed libraries |
| 17 | +will be installed to an operational system, arhictecture, toolchain, and `R` version |
| 18 | +dependent directory. The loaction of this directory by default is |
| 19 | +(by setting `R_LIBS_USER` environmental variable to) |
| 20 | +`$VSC_DATA/local_R_LIBS/$VSC_OS_LOCAL/$VSC_ARCH_LOCAL/<R version>-<toolchain>`. |
| 21 | + |
| 22 | +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 |
| 24 | +*before* you load any centrally installed `R` module. In this case, the location of the |
| 25 | +directory for self installed `R` libraries will be |
| 26 | +`$R_LIBS_BASEDIR/local_R_LIBS/$VSC_OS_LOCAL/$VSC_ARCH_LOCAL/<R version>-<toolchain>`. |
| 27 | +If this directory is not writtable, you can still be able to use already installed |
| 28 | +`R` libararies from that location, but you will not be able to install `R` libarires |
| 29 | +yourself. |
| 30 | + |
| 31 | +You can always check the default location(s) of `R` libraries by issuing `.libPaths()` command |
| 32 | +in `R`. This command will show the library locations ordered by their priorites. |
| 33 | + |
| 34 | +Please be aware that if you have installed an `R` libaries yourself in the past, you might have to |
| 35 | +reinstall those if you want to use them: |
| 36 | +- on a different cluster |
| 37 | +- with a different version of `R` |
| 38 | +- with an `R` compiled with a different version of toolchain |
| 39 | +- if the operational system is changed/updated. |
| 40 | + |
0 commit comments