Rgdal is not available for version R 3.2.2

I am testing the examples mentioned in this link . I have successfully installed all the packages mentioned as base packages here. When I try to use the gmap command (indicated in the example as mymap <- gmap("France") , I get the following problem:

 > gmap("France") Loading required namespace: rgdal Failed with error: 'there is no package called 'rgdal'' Error in gmap("France") : rgdal not available 

I also know that the gmap command belongs to the dismo package. And I have successfully installed this package.

+5
source share
2 answers

I had the same problem and was getting the error 'rgdal' was built under R version 3.1.3. when I tried install.packages("rgdal") and installation of package had non-zero exit status while trying to install.packages('rgdal', type = "source")

But it only worked now, try again.

0
source

One of the causes of this error is an outdated version of the main package R. For example, in Ubuntu, this happens if the r-base package is installed from the universe repository.

The fix is ​​to add a CRAN repository and install R:

 sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys E298A3A825C0D65DFD57CBB651716619E084DAB9 sudo add-apt-repository 'deb [arch=amd64,i386] https://cran.rstudio.com/bin/linux/ubuntu xenial/' sudo apt-get update sudo apt-get install r-base 
0
source

All Articles