From 1fb494364507cc9539901271c202cad69e61f324 Mon Sep 17 00:00:00 2001 From: Roger Date: Sun, 2 Jun 2024 14:25:02 +0200 Subject: [PATCH] address #154 --- DESCRIPTION | 4 ++-- NEWS.md | 4 ++++ vignettes/sids.Rmd | 4 ++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 4502593a..e11ae10f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: spdep -Version: 1.3-4 -Date: 2024-05-31 +Version: 1.3-5 +Date: 2024-06-02 Title: Spatial Dependence: Weighting Schemes, Statistics Encoding: UTF-8 Authors@R: c(person("Roger", "Bivand", role = c("cre", "aut"), diff --git a/NEWS.md b/NEWS.md index ed22d5fd..4515ecc2 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,5 +1,9 @@ # Version 1.3-4 (development) +* #154 turn on `s2` in vignette + +# Version 1.3-4 (2024-05-31) + * add `scale` argument to `geary.test`, `geary.mc` and `geary` #151, and appropriate tests * Introduce error in `knearneigh` for `k` less than the largest count of identical points; if encountered, increase `k` diff --git a/vignettes/sids.Rmd b/vignettes/sids.Rmd index ea43b317..6c1eec13 100644 --- a/vignettes/sids.Rmd +++ b/vignettes/sids.Rmd @@ -49,7 +49,7 @@ data set in **spData**. The actual data, included in a shapefile of the county b ```{r echo=TRUE,eval=TRUE} library(spdep) nc <- st_read(system.file("shapes/sids.shp", package="spData")[1], quiet=TRUE) -st_crs(nc) <- "+proj=longlat +datum=NAD27" +st_crs(nc) <- "EPSG:4267" row.names(nc) <- as.character(nc$FIPSNO) ``` @@ -63,7 +63,7 @@ using the `st_centroid` method from **sf** as an **sfc** POINT object, and can be used to place labels after the extraction of the coordinate matrix: ```{r echo=TRUE} -sf_use_s2(FALSE) +sf_use_s2(TRUE) plot(st_geometry(nc), axes=TRUE) text(st_coordinates(st_centroid(st_geometry(nc), of_largest_polygon=TRUE)), label=nc$FIPSNO, cex=0.5) ```