pairdist: Pairwise distances

Description Usage Arguments Details Value Author(s) See Also

View source: R/distances.R


Computes the matrix of distances between all pairs of ‘things’ in a dataset





Object specifying the locations of a set of ‘things’ (such as a set of points or a set of line segments).


Further arguments depending on the method.


Given a dataset X and Y (representing either a point pattern or a line segment pattern) pairdist computes the distance between each pair of ‘things’ in the dataset, and returns a matrix containing these distances.

The function pairdist is generic, with methods for point patterns (objects of class "ppp"), line segment patterns (objects of class "psp") and a default method. See the documentation for pairdist.ppp, pairdist.psp or pairdist.default for details.


A square matrix whose [i,j] entry is the distance between the ‘things’ numbered i and j.


Pavel Grabarnik and \adrian

See Also

pairdist.ppp, pairdist.psp, pairdist.default, crossdist, nndist, Kest

spatstat documentation built on May 30, 2017, 7:53 a.m.

Search within the spatstat package
Search all R packages, documentation and source code