I am trying out the examples mentioned in this link . I have successfully installed all the packages mentioned as the basic packages here.
When I try to use command gmap
(given 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
Also I am aware that gmap
command belongs to the package dismo
. And I have successfully installed this package.
One of the reasons for this error is an outdated version of the core R package. On Ubuntu, for instance, this happens if the r-base
package is installed from the universe repository.
The fix is to add the CRAN repository and install R from there:
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
to install rgdal upgrade your R version to at least 3.5.0
https://cran.r-project.org/package=rgdal
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With