diff --git a/man/poly2nb.Rd b/man/poly2nb.Rd index ecca626a..aa2c80ea 100644 --- a/man/poly2nb.Rd +++ b/man/poly2nb.Rd @@ -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))