Learn R Programming

spdep (version 0.1-10)

nbdists: Spatial link distance measures

Description

Given a list of spatial neighbour links (a neighbours list of object type nb), the function returns the Euclidean distances along the links in a list of the same form as the neighbours list.

Usage

nbdists(nb, coords)

Arguments

nb
an object of class nb
coords
matrix of point coordinates

Value

  • A list with class nbdist

See Also

summary.nb, nb2listw

Examples

Run this code
data(columbus)
dlist <- nbdists(col.gal.nb, coords)
dlist <- lapply(dlist, function(x) 1/x)
stem(unlist(dlist))

Run the code above in your browser using DataLab