st_nb_dists: Calculate neighbor distances

View source: R/st_nb_dist.R

st_nb_distsR Documentation

Calculate neighbor distances

Description

From an nb list and point geometry, return a list of distances for each observation's neighbors list.

Usage

st_nb_dists(x, nb, longlat = NULL)

Arguments

x

Spatial points. Typically the geometry column of an sf object.

nb

A nb neighbor list such as created from st_knn(x, k = 1).

longlat

TRUE if point coordinates are longitude-latitude decimal degrees, in which case distances are measured in kilometers. See ?spdep::nbdists() for more.

Details

Utilizes spdep::nbdists() for distance calculation.

See Also

Other stats: geary_test(), local_moran(), moran_mc(), moran_test(), st_lag()


JosiahParry/sfweight documentation built on April 4, 2022, 1:52 a.m.