Skip to contents

Identify higher order neighbors from a neighbor list. order must be greater than 1. When order equals 2 then the neighbors of the neighbors list is returned and so forth. See Anselin's book was: "https://spatial.uchicago.edu" "/sites/spatial.uchicago.edu/files/1_introandreview_reducedsize.pdf" for an example.

Usage

st_nb_lag(nb, order)

Arguments

nb

A neighbor list object as created by st_contiguity().

order

The order of neighbors.

Value

a list of class nb

Details

Utilizes spdep::nblag()

See also

Examples

nb <- st_contiguity(sf::st_geometry(guerry))
st_nb_lag(nb, 3)
#> Neighbour list object:
#> Number of regions: 85 
#> Number of nonzero links: 988 
#> Percentage nonzero weights: 13.67474 
#> Average number of links: 11.62353