Description Usage Arguments Value See Also Examples
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.
1 | pairCoordinates(locations, pairIndices)
|
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. |
A q x 4 matrix, where each row gives the Cartesian coordinates of the two locations in the corresponding pair.
1 2 3 | (locations<-cbind(rep(1:2,3),rep(1:3,each=2)))
(pairs <- selectPairIndices(locations, maxDistance = 1.5))
pairCoordinates(locations, pairs)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.