View source: R/pairwise_vectors.R
pairwise_vectors | R Documentation |
Computes pairwise vectors of a 2d or 3d point pattern. Returns circular- or spherical coordinates, depending on the dimension.
pairwise_vectors(x, from, to, asMatrix = FALSE, as.xyz = FALSE)
x |
matrix of coordinates. |
from |
Indices from which to compute |
to |
Indices to which to compute |
asMatrix |
return n x n matrices |
as.xyz |
return as xyz-coordinates instead of polar/spherical |
Default is to return the upper triangle (without diagonal) of pairwise distance and angle matrices.
Result will have 2 or 3 columns, where first is the distance and 2(:3) are angle(s).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.