diff --git a/NEWS.md b/NEWS.md index 9ae22b6..fdb3577 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,6 @@ # Version 1.3-8 (development) +* Remove remaining `spData` ESRI shapefile use # Version 1.3-7 (2024-11-25) diff --git a/man/moran.plot.Rd b/man/moran.plot.Rd index 76d3f8a..e64141a 100644 --- a/man/moran.plot.Rd +++ b/man/moran.plot.Rd @@ -55,7 +55,7 @@ if (require(ggplot2, quietly=TRUE)) { geom_text(data=mp[mp$is_inf,], aes(x=x, y=wx, label=labels, vjust=1.5)) + xlab(xname) + ylab(paste0("Spatially lagged ", xname)) } -columbus <- st_read(system.file("shapes/columbus.shp", package="spData")) +columbus <- st_read(system.file("shapes/columbus.gpkg", package="spData")) nb <- poly2nb(columbus) listw <- nb2listw(nb) moran.plot(x=columbus$CRIME, y=columbus$INC, listw=listw) diff --git a/vignettes/sids.Rmd b/vignettes/sids.Rmd index 05b05e1..9c02bb2 100644 --- a/vignettes/sids.Rmd +++ b/vignettes/sids.Rmd @@ -84,16 +84,12 @@ library(sf) nc_sf <- st_read(system.file("shape/nc.shp", package="sf"), quiet=TRUE) st_crs(nc_sf) -nc <- st_read(system.file("shapes/sids.shp", +nc <- st_read(system.file("shapes/sids.gpkg", package="spData"), quiet=TRUE) st_crs(nc) ``` -As the actual CRS is unknown, **spData** reports missing, although it may very well be `+proj=longlat +datum=NAD27` - -```{r echo=TRUE,eval=TRUE} -st_crs(nc) <- "+proj=longlat +datum=NAD27" -``` +As the actual CRS was unknown, the GeoPackage **spData** version has been updated to `"EPSG:4267"`. Next, are the geometries the same? `sf::st_equals` returns a logical matrix, so we'll check that the diagonal values are all `TRUE`, and that only those values are `TRUE` by summing and recalling that `n` is `100`: