The XML and lwgeom packages are required for tmap to load but aren't listed under dependencies
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.
Strange, because for Windows system dependencies should be installed automatically. Can you install tmaptools? Those two dependencies come from that package.
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!
Closing for now -- if the problem persist or any of you have any ideas why it happens, please let us know.