tmap icon indicating copy to clipboard operation
tmap copied to clipboard

The XML and lwgeom packages are required for tmap to load but aren't listed under dependencies

Open fgashakamba opened this issue 6 months ago • 2 comments

Working on Windows with R version 4.4.2, I run: install.packages("tmap", dependencies = TRUE) and it completes successfully. However, when I later on run library(tmap) I get an error that XML and then lwgeom packages are missing.

fgashakamba avatar Jun 02 '25 07:06 fgashakamba

Strange, because for Windows system dependencies should be installed automatically. Can you install tmaptools? Those two dependencies come from that package.

mtennekes avatar Jun 02 '25 09:06 mtennekes

Random dependent packages on Windows not installing when they should is not unusual. I would recommend trying to install the specific packages first (install.packages("XML") and install.packages("lwgeom") and then try installing tmap again.

See https://nickbearman.github.io/installing-software/r-rstudio-library-troubleshooting.html for some more info.

I've never managed to work out why this is, but seems to happen about 1 in 20 cases on Windows maybe? Any suggestions welcome!

nickbearman avatar Jun 03 '25 08:06 nickbearman

Closing for now -- if the problem persist or any of you have any ideas why it happens, please let us know.

Nowosad avatar Jun 22 '25 15:06 Nowosad