nndistsph | R Documentation |
Computes the distance from each point to its nearest neighbour in a point pattern on (a subset of) a sphere.
nndistsph(X, rad=1)
X |
Locations of points. An object of class |
rad |
Optional. The radius of the sphere, default value 1. Not required
if |
This function computes the minimum great circle distance from each point in a point pattern on a (subset of) a sphere to its nearest neighbour (the nearest other point of the pattern).
To use the nearest neighbour distances for statistical inference, it
is often advisable to use the edge-corrected empirical distribution,
computed by Gsphere
.
To find the nearest neighbour distances from one point pattern to
another point pattern, use nncrosssph
.
If X
is an object of class sp2
or
sp3
, then its radius will be used rather than that
specified in rad
.
Numeric vector or matrix containing the nearest neighbour distances for each point.
This function is the analogue for point processes on the sphere of the
function nndist
in spatstat, which is
the corresponding function for point processes in R^2. Hence elements
of this help page have been taken from nndist
with the
permission of A. J. Baddeley. This enables the information on this
help page to be consistent with that for
nndist
. It is
hoped that this will minimise or remove any confusion for users of
both spatstat and spherstat .
Tom Lawrence <email: tjlawrence@bigpond.com>
pairdistsph
(pairwise distances for a single sample),
gcdist
(great circle distance between two points),
bdist.sphwin
(boundary distances), nndist
sph <- sphwin(type="sphere") rps <- rpoispp.sphwin(win=sph, lambda=1) nndistsph(X=rps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.