Skip to content

Commit

Permalink
add style= to sn2listw in tri2nb
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Nov 24, 2023
1 parent 1d5fccc commit 46c9078
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -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"),
Expand Down
6 changes: 5 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -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`

Expand Down
2 changes: 1 addition & 1 deletion R/tri2nb.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 46c9078

Please sign in to comment.