nbdists

0th

Percentile

Spatial link distance measures

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. If longlat = TRUE, Great Circle distances are used.

Keywords
spatial
Usage
nbdists(nb, coords, longlat = NULL)
Arguments
nb
an object of class nb
coords
matrix of point coordinates or a SpatialPoints object
longlat
TRUE if point coordinates are longitude-latitude decimal degrees, in which case distances are measured in kilometers; if coords is a SpatialPoints object, the value is taken from the object itself
Value

A list with class nbdist

See Also

summary.nb, nb2listw

Aliases
  • nbdists
Examples
example(columbus)
coords <- coordinates(columbus)
dlist <- nbdists(col.gal.nb, coords)
dlist <- lapply(dlist, function(x) 1/x)
stem(unlist(dlist))
Documentation reproduced from package spdep, version 0.6-9, License: GPL (>= 2)

Community examples

Looks like there are no examples yet.