0

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

r2evans
  • 141,215
  • 6
  • 77
  • 149
Nick H
  • 3
  • 1
  • That indicates to me that it is *not* installing correctly. I haven't seen that before. Try downloading the source (or binary) package directly, *manually*, and install from a local file instead. I've heard of corporate firewalls/proxies corrupting tar-balls or zip-files before, perhaps this could be an indication of this. – r2evans Feb 04 '21 at 04:30
  • Did you check that _all_ of the Imports and Suggests are up to date? – IRTFM Feb 04 '21 at 06:30
  • Yes so I have checked and all imports and suggests are up to date. I have also tried installing the source package manually from a local file and still receive the same error. I've been able to install all other packages successfully except tmap – Nick H Feb 04 '21 at 22:54

1 Answers1

0

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.

Martijn Tennekes
  • 1,951
  • 13
  • 19