Description Usage Arguments Value See Also Examples
Out of a list of locations given by their Cartesian coordinates, selects pairs of locations with a distance as a criterion.
1 | selectPairIndices(locations, maxDistance = NULL, numberOfPairs = NULL)
|
locations |
A d x 2 matrix containing the Cartesian coordinates of d points in the plane. |
maxDistance |
Pairs of locations with distance not larger than |
numberOfPairs |
The number of pairs that will be selected, taking distance as a criterion, with closer pairs being selected. It will return more pairs if there are several equidistant locations. |
A matrix with q
rows and 2 columns, where q
denotes the number of pairs selected. Each row contains the indices of the corresponding pair of selected locations in the input argument locations
.
1 2 | (locations<-cbind(rep(1:4,5),rep(1:5,each=4)))
selectPairIndices(locations, maxDistance = 1.5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.