Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

crossdist

Pairwise distances


Description

Computes the distances between pairs of ‘things’ taken from two different datasets.

Usage

crossdist(X, Y, ...)

Arguments

X,Y

Two objects of the same class.

...

Additional arguments depending on the method.

Details

Given two datasets X and Y (representing either two point patterns or two line segment patterns) crossdist computes the Euclidean distance from each thing in the first dataset to each thing in the second dataset, and returns a matrix containing these distances.

The function crossdist 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 crossdist.ppp, crossdist.psp or crossdist.default for further details.

Value

A matrix whose [i,j] entry is the distance from the i-th thing in the first dataset to the j-th thing in the second dataset.

Author(s)

See Also


spatstat.geom

Geometrical Functionality of the 'spatstat' Family

v2.1-0
GPL (>= 2)
Authors
Adrian Baddeley [aut, cre], Rolf Turner [aut], Ege Rubak [aut], Tilman Davies [ctb], Ute Hahn [ctb], Abdollah Jalilian [ctb], Sebastian Meyer [ctb], Suman Rakshit [ctb], Dominic Schuhmacher [ctb], Rasmus Waagepetersen [ctb]
Initial release
2021-04-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.