In RStudio is there a way to integrate or load environment modules before startup?
The issue is: we use an environment modules system on our server. Some R libraries depend on system libraries, for instance rgdal depends on gdal. This works perfectly in R, we will load the necessary modules into our environment with lmod before launching R, and R will be able to find them. This is not the case in RStudio as there does not seem to be a way to load these into our environment beforehad. library(rgdal) will of course fail with 'libgdal.so.26: cannot open shared object file: No such file or directory'
I am wondering if there is some sort of global (or user specific) file where we can instruct RStudio to load these modules into the environment before startup. If not, if there is some way to add the PATH of these libraries instead so RStudio knows where to look, that would work too.