| pairdist.ppx | R Documentation |
Computes the matrix of distances between all pairs of points in a multi-dimensional point pattern.
## S3 method for class 'ppx'
pairdist(X, ...)
X |
A point pattern (object of class |
... |
Arguments passed to |
This is a method for the generic function pairdist.
Given a multi-dimensional point pattern X
(an object of class "ppx"),
this function computes the Euclidean distances between all pairs of
points in X, and returns the matrix of distances.
By default, both spatial and temporal coordinates are extracted.
To obtain the spatial distance between points in a space-time point
pattern, set temporal=FALSE.
A square matrix whose [i,j] entry is the distance
between the points numbered i and j.
The values returned by pairdist(X, temporal=FALSE) are distances,
expressed as multiples of the unit of length of the spatial
coordinates in X.
The unit of length is given by unitname(X).
Note that, if the unit of length in X is a composite
expression such as ‘2 microns’,
then the values of pairdist(X, temporal=FALSE)
are expressed as multiples
of 2 microns, rather than being expressed in microns.
pairdist,
crossdist,
nndist
df <- data.frame(x=runif(4),y=runif(4),z=runif(4),w=runif(4))
X <- ppx(data=df)
pairdist(X)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.