Search code examples
rcraninstall.packagestmap

Can't install tmap R Package


I am having trouble installing the tmap R package. I am trying to install it using install.packages("tmap") and mn receiving this error:

Error: package or namespace load failed for ‘tmap’ in namespaceExport(ns, exports):
 undefined exports: providers
Error: loading failed
Execution halted
ERROR: loading failed

Warning in install.packages :
  installation of package ‘tmap’ had non-zero exit status

I'm new to R, but have tried many of the basic bug fix approaches (Reinstalling R Studio, quitting and restarting a session, installing from a local tar.gz instead of CRAN) but none seem to work. I think the package is being installed successfully but is not being loaded. Is that correct? How would I get tmap to load correctly?

I'm using R vers 3.6.1

Cheers


Solution

  • The object providers is re-exported from leaflet. Please make sure that leaflet is installed correctly, and check if leaflet::providers exists.

    I would also strongly recommend to upgrade R to 4.x, if possible. I recall that there were some packages in the dependency/imports tree that didn't work well for R 3.x.