diff --git a/DESCRIPTION b/DESCRIPTION index c6576ed9..0a05fb36 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,6 +1,6 @@ Package: spdep -Version: 1.3-1 -Date: 2023-11-03 +Version: 1.3-2 +Date: 2023-11-24 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 8623f72a..9b329cf5 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,8 @@ -# Version 1.3-1 (development) +# Version 1.3-2 (development) + +* add `style` to `sn2listw` use in `tri2nb` + +# Version 1.3-1 (2023-11-23) * functions creating `nb` objects now warn if the object has a sub-graph count of > 1 and `get.SubgraphOption` is `TRUE` (default `FALSE`): `complement.nb`, `diffnb`, `dnearneigh`, `droplinks`, `edit.nb`, `graph2nb`, `knn2nb`, `nb2blocknb`, `nblag`, `nblag_cumul`, `poly2nb`, `read.gal`, `read.gwt2nb`, `setdiff.nb`, `tolerance.nb`, `tri2nb`, `union.nb` diff --git a/R/tri2nb.R b/R/tri2nb.R index 53234d13..2bc69376 100644 --- a/R/tri2nb.R +++ b/R/tri2nb.R @@ -44,7 +44,7 @@ tri2nb <- function(coords, row.names = NULL) { attr(df, "n") <- tri$n.data class(df) <- c(class(df), "spatial.neighbour") df1 <- df[order(df$from),] - nb <- sn2listw(df1)$neighbours + nb <- sn2listw(df1, style="B")$neighbours # nb <- neighbours(tri) attr(nb, "region.id") <- row.names class(nb) <- "nb"