| .pointDistance | R Documentation |
These have been written with speed in mind.
.pointDistance(
from,
to,
angles = NA,
maxDistance = NA_real_,
otherFromCols = FALSE
)
from |
Numeric matrix with 2 or 3 or more columns. They must include x and y,
representing x and y coordinates of "from" cell. If there is a column
named "id", it will be "id" from |
to |
Numeric matrix with 2 or 3 columns (or optionally more, all of which
will be returned),
x and y, representing x and y coordinates of "to" cells, and
optional "id" which will be matched with "id" from |
angles |
Logical. If |
maxDistance |
Numeric in units of number of cells. The algorithm will build
the whole surface (from |
otherFromCols |
other columns to use as 'from' |
A matrix with one row per from-to pair, carrying the columns of
from plus "dists", the distance between from and to.
angles = TRUE adds an "angles" column, otherFromCols adds the
named columns of from, and a non-NA maxDistance adds
"keptIndex", the index of each retained pair in the unfiltered set.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.