powered by
Identify the cardinality of a neighbor object. Utilizes spdep::card() for objects with class nb, otherwise returns lengths(nb).
spdep::card()
nb
lengths(nb)
st_cardinalties(nb)
an integer vector with the same length as nb.
A neighbor list object as created by st_neighbors().
st_neighbors()
Other other: st_nb_lag(), st_nb_lag_cumul()
st_nb_lag()
st_nb_lag_cumul()
nb <- st_contiguity(sf::st_geometry(guerry)) st_cardinalties(nb)
Run the code above in your browser using DataLab