pairCoordinates: Function 'pairCoordinates'

Description Usage Arguments Value See Also Examples

Description

Given a matrix of coordinates of locations and a matrix of indices of pairs of locations, returns a matrix with the coordinates of the pairs of locations.

Usage

1
pairCoordinates(locations, pairIndices)

Arguments

locations

A d x 2 matrix containing the Cartesian coordinates of d points in the plane.

pairIndices

A q x 2 matrix containing the indices of q pairs of points.

Value

A q x 4 matrix, where each row gives the Cartesian coordinates of the two locations in the corresponding pair.

See Also

selectPairIndices

Examples

1
2
3
(locations<-cbind(rep(1:2,3),rep(1:3,each=2)))
(pairs <- selectPairIndices(locations, maxDistance = 1.5))
pairCoordinates(locations, pairs)

spatialTailDep documentation built on May 2, 2019, 4:51 a.m.