nndist.lpp
From spatstat v1.41-1
by Adrian Baddeley
Nearest neighbour distances on a linear network
Given a pattern of points on a linear network, compute the nearest-neighbour distances, measured by the shortest path in the network.
- Keywords
- spatial
Usage
## S3 method for class 'lpp':
nndist(X, ..., method="C")
Arguments
- X
- Point pattern on linear network (object of class
"lpp"
). - method
- Optional string determining the method of calculation.
Either
"interpreted"
or"C"
. - ...
- Ignored.
Details
Given a pattern of points on a linear network, this function computes the
nearest neighbour distance for each point (i.e. the distance
from each point to the nearest other point), measuring
distance by the shortest path in the network.
If method="C"
the distances are computed using
code in the C language. If method="interpreted"
then the
computation is performed using interpreted Rcode. The Rcode is
much slower, but is provided for checking purposes.
Value
- A numeric vector, of length equal to the number of points in
X
.
See Also
Examples
example(lpp)
nndist(X)
Community examples
Looks like there are no examples yet.