crossdist: Pairwise distances

Description Usage Arguments Details Value Author(s) See Also

View source: R/distances.R

Description

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

Usage

1
  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)

\adrian

See Also

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


spatstat documentation built on May 20, 2017, 5:36 a.m.

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

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs in the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.