Tigris, terra etc... packages in R on Baobab

Hi,
I’m trying to install some packages on R 4.0.0 on Baobab. To be precise, the packages are:

install.packages(“exactextractr”)
install.packages(“terra”, dependencies=TRUE)
install.packages(“tigris”, dependencies=TRUE)

Despite having created an .Rprofile object where all my packages should go, I receive every time an error message like this:

In install.packages(“exactextractr”) :
installation of package ‘exactextractr’ had non-zero exit status

library(exactextractr)
Error: package or namespace load failed for ‘exactextractr’ in library.dynam(lib, package, package.lib):
shared object ‘sf.so’ not found

How does one fix it?

Thank you a lot, best

Costanza Naguib

Hi @Costanza.Naguib,

I’ll give a try. In the meantime: is there any reason to use such an old R version?

Best

Yann

Thank you. No reason, but the problem persist also using later versions, e.g. 4.2.0.

In addition, when I try to load version 4.3.0 I receive the following error message:
I: full hostname: cpu154.baobab
Lmod has detected the following error: The following module(s) are unknown:
“R/4.3.0”

Please check the spelling or version number. Also try “module spider …”
It is also possible your cache file is out-of-date; it may help to try:
$ module --ignore_cache load “R/4.3.0”

Also make sure that all modulefiles written in TCL start with the string
#%Module

slurmstepd: error: execve(): R: No such file or directory
srun: error: cpu154: task 0: Exited with exit code 2

You can check which R version are available on the cluster like this:

Apptainer> ml spider R

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
  R:
-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Description:
      R is a free software environment for statistical computing and graphics.

     Versions:
        R/3.2.3
        R/3.5.1
        R/3.6.0
        R/3.6.2
        R/4.0.0
        R/4.0.4
        R/4.1.0
        R/4.1.2
        R/4.2.0
        R/4.2.1

As you may see, the latest version we have right now is 4.2.1.

I see, thank you. Then I can confirm that the problem persists identical also with the latest available version