| st_cardinalties | R Documentation | 
Identify the cardinality of a neighbor object. Utilizes spdep::card() for objects with class nb, otherwise returns lengths(nb).
st_cardinalties(nb)
| nb | A neighbor list object as created by  | 
an integer vector with the same length as nb.
Other other: 
st_nb_lag(),
st_nb_lag_cumul()
nb <- st_contiguity(sf::st_geometry(guerry))
st_cardinalties(nb)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.