LTER-LIFE / VeluweProtoDT

Veluwe proto-DT: a digital mini twin of tree phenology and climate scenarios
0 stars 0 forks source link

Solve R package management in NaaVRE #47

Open StefanVriend opened 9 months ago

StefanVriend commented 9 months ago

R packages are automatically installed '/venv/lib/R/library', but this folder is cleared when a user logs out of their Virtual Lab. This means that every time a user logs into their Virtual Lab, the packages installed during previous sessions are no longer available.

StefanVriend commented 9 months ago

Shortcut

To solve this, we want to store R packages in our home folder (i.e., '/home/jovyan'). The user can then manually set the path as follows .libPaths('/home/jovyan/<folder with R packages>'), but we should have a more sustainable, automatic solution. For example, on a Windows system, one can set the environment variables 'R_LIBS' and 'R_LIBS_USER' so that R/Rstudio knows where to find the packages when started up.