pairdist.sph | R Documentation |
Computes the matrix of distances between all pairs of points on a sphere.
pairdistsph(X, rad = 1)
X |
Locations of points. An object of class |
rad |
Optional. The radius of the sphere, default value 1. Not required
if |
Given a dataset (representing a point pattern on a sphere, or a subset
of a sphere) pairdistsph
computes the minimum great circle
distance between each pair of points in the dataset, and returns a
matrix containing these distances.
If X
is an object of class sp2
or
sp3
, then its radius will be used rather than that
specified in rad
.
A square matrix whose [i,j]
entry is the distance between the
points numbered i and j.
This function is the analogue for point processes on the sphere of the
function pairdist
in spatstat, which is
the corresponding function for point processes in R^2. Hence elements
of this help page have been taken from pairdist
with the
permission of A. J. Baddeley. This enables the information on this help
page to be consistent with that for pairdist
.
It is hoped that this will minimise or remove any confusion for users of both
spatstat and spherstat.
Tom Lawrence <email: tjlawrence@bigpond.com>
nndistsph
(nearest neighbour distances),
gcdist
(great circle distance between two points),
bdist.sphwin
(boundary distances), pairdist
sph <- sphwin(type="sphere") rps <- rpoispp.sphwin(win=sph, lambda=1) pairdistsph(rps)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.