Computes the matrix of distances between all pairs of points in a point pattern.
## S3 method for class 'ppp': pairdist(X, \dots, method="C")
- A point pattern (object of class
- String specifying which method of calculation to use.
"interpreted". Usually not specified.
This is a method for the generic function
Given a point pattern
X (an object of class
this function computes the Euclidean distances between all pairs of
X, and returns the matrix of distances.
method is not normally used. It is
retained only for checking the validity of the software.
method = "interpreted" then the distances are
computed using interpreted R code only. If
(the default) then C code is used. The C code is somewhat faster.
- A square matrix whose
[i,j]entry is the distance between the points numbered
data(cells) d <- pairdist(cells)