0

I'm having trouble loading the package 'tmap'. When I try R returns the message Error : object ‘distGeo’ is not exported by 'namespace:geosphere' Error: package or namespace load failed for ‘tmap’ I can load the geosphere package which this seems to relate to but tmap won't load. Does anybody have any ideas? I am new to tmap, and am trying the tutorial 'Introduction to visualising spatial data in R' at https://cran.r-project.org/doc/contrib/intro-spatial-rl.pdf I believe the version of tmap I'm using is the latest one. Cheers, Dan

DanMac
  • 1
  • 1
  • Strange, distGeo is exported. Could you run a `sessionInfo()`. Does it help to do `library(tmaptools)` first? – Martijn Tennekes Feb 24 '17 at 14:55
  • Cheers. If I try to load the tmaptools package first it returns the exact same error message about distGeo that I get when I try to load the tmaps package. sessionInfo() returns: > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 7 x64 (build 7601) Service Pack 1 locale: [1] LC_COLLATE=English_New Zealand.1252 LC_CTYPE=English_New Zealand.1252 LC_MONETARY=English_New Zealand.1252 [4] LC_NUMERIC=C LC_TIME=English_New Zealand.1252 – DanMac Feb 26 '17 at 19:57
  • continued : attached base packages: character(0) other attached packages: [1] tmaptools_1.2 attached base packages: character(0) other attached packages: [1] tmaptools_1.2 loaded via a namespace (and not attached): [1] Rcpp_0.12.9 magrittr_1.5 grDevices_3.3.2 geosphere_1.3-13 xtable_1.8-2 lattice_0.20-34 [7] R6_2.2.0 tools_3.3.2 utils_3.3.2 dichromat_2.0-0 grid_3.3.2 KernSmooth_2.23-15 – DanMac Feb 26 '17 at 20:00
  • [13] e1071_1.6-8 htmltools_0.3.5 stats_3.3.2 crosstalk_1.0.0 datasets_3.3.2 class_7.3-14 [19] leaflet_1.1.0 digest_0.6.12 base_3.3.2 shiny_1.0.0 RColorBrewer_1.1-2 htmlwidgets_0.8 [25] graphics_3.3.2 mime_0.5 sp_1.2-4 methods_3.3.2 classInt_0.1-23 XML_3.98-1.5 [31] httpuv_1.3.3 – DanMac Feb 26 '17 at 20:00

1 Answers1

0

Ah, distGeo only exists as of version 1.4-3 of geosphere. So this problem should be solved when you update geosphere.

I will specify this version dependency in the DESCRIPTION file of tmaptools.

Thanks for letting me know, Dan!

Martijn Tennekes
  • 1,951
  • 13
  • 19