Skip to content

Commit

Permalink
fix spdep error shown in r-spatial/sf#2429
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Sep 6, 2024
1 parent 8a95820 commit bacfc80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion man/poly2nb.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ sq2 <- sq + c(0,1)
sq3 <- sq + c(1,0)
sq4 <- sq + c(1,1)
gm <- st_sfc(list(sq, sq2, sq3, sq4))
df <- st_as_sf(gm, id=1:4)
df <- st_as_sf(data.frame(gm, id=1:4))
plot(st_geometry(df))
text(st_coordinates(st_centroid(gm)), as.character(df$id))
unclass(poly2nb(df, queen = FALSE))
Expand Down

0 comments on commit bacfc80

Please sign in to comment.