| st_nb_dists | R Documentation | 
From an nb list and point geometry, return a list of distances for each observation's neighbors list.
st_nb_dists(x, nb, longlat = NULL)
| x | an object of class  | 
| nb | a neighbor list for example created by  | 
| longlat | 
 | 
Utilizes spdep::nbdists() for distance calculation.
a list where each element is a numeric vector.
Other weights: 
st_inverse_distance(),
st_kernel_weights(),
st_weights()
geo <- sf::st_geometry(guerry)
nb <- st_contiguity(geo)
dists <- st_nb_dists(geo, nb)
head(dists)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.