Installing R packages fail

During our early adopter project part of our workflow included operations on vector objects. We couldn’t, however, install the required packages in the ESDL system. To save time we ended up doing those operations outside of ESDL and bring the results in using two (large) NetCDF files.

However, now that we are preparing to extend our drought analysis, we have been discussing that it would be beneficial to switch from a gridded presentation of drainage basins to a vector presentation.

Currently we cannot do that in the ESDL, because the core R packages fail to install. I am guessing that this is because the system won’t allow installing of packages which include external executables - e.g. rgeos and rgdal fail to install because they come packaged with GEOS and GDAL. Would it be possible to allow installing this kind of packages? We’d specifically need the ‘sf’ package installed, which depends on rgeos and rgdal.

BR
Marko

Hi,

You need to change the deafult installation folder for your packages to a folder for which you have write privileges. The following lines worked for me:

mypackagepath = “/home/jovyan/work/workspace/my_rpackages”

.libPaths(c(mypackagepath,.libPaths()))

Jorge

Hi Jorge,

Thanks, but unfortunately changing the libpath haven’t worked, at least not for me.
I just tried installing them again, and to my surprise ‘rgeos’ does get installed, but ‘rgdal’ or ‘sf’ does not. Are you able to install these packages?

Hi Marko,

You’re right. The lines above worked for me back in june when I was installing my dependencies, but they no longer work to install new packages. I wonder if there was a change to the server permits for the installation of libraries.

Best

Jorge

Hello Marko,

we took a look into the issue and it seems to be a version issue of poj4. We are working on finding out how to make rgdal work.

Best regards,
Alicja

Hello Marko,

@dzelge found the solution to the problem, we will include rgdal and rgeos into the Docker-images. However, as a quick fix for you: open the terminal within the workspace of your jupyter lab and conda install -c conda-forge r-rgdal as well as conda install -c conda-forge r-rgeos.

Hopefully, you can continue with your work now!
Have a great day,
Alicja