I want to load in the map data, which is found in spData.
- I tried to install the package:
install.packages("spData")
- Then I tried to load the package:
library(spData)
When I do this I get the following error:
Error: package or namespace load failed for ‘spData’ in loadNamespace(i, c(lib.loc, .libPaths()), versionCheck = vI[[i]]): namespace ‘terra’ 1.4-22 is being loaded, but >= 1.5.12 is required
How do I solve this?
CodePudding user response:
This is probably because you have a version or raster that is ahead of the version of terra that it requires, caused by a temporary glitch at CRAN with the binary versions for Windows. The easiest way around this problem is to install the development version of terra, and then reinstall raster:
install.packages('terra', repos='https://rspatial.r-universe.dev')
install.packages('raster')
