Creates an encompassing neighbor list of the order specified. For example, if the order is 2 the result contains both 1st and 2nd order neighbors.
Arguments
- nb
A neighbor list object as created by
st_contiguity()
.- order
The order of neighbors.
Details
Utilizes spdep::nblag_cumul()
See also
Other other:
st_cardinalties()
,
st_nb_lag()
Examples
nb <- st_contiguity(sf::st_geometry(guerry))
st_nb_lag_cumul(nb, 3)
#> Neighbour list object:
#> Number of regions: 85
#> Number of nonzero links: 2164
#> Percentage nonzero weights: 29.95156
#> Average number of links: 25.45882