Description Usage Arguments Details Value Examples
Calculates pairwise distances between two sets of locations.
1 2 | pairwise_dist(coords1, coords2 = coords1, dmethod = SpatialTools::dist2,
...)
|
coords1 |
the coordinates of the first set of locations (dimension n1 x p). |
coords2 |
the coordinates of the second set of locations (dimension n2 x p). |
dmethod |
the type of distance to compute, see Details. |
... |
space for additional arguments |
This function is a wrapper for existing distance functions. Argument dmethod selects from
two types of distances to be computed:
Euclidean distance: Computes distance using SpatialTools::dist2.
For this method, identical(dmethod, SpatialTools::dist2) should return TRUE (default behavior).
Great circle distance: Distance on a sphere/ellipsoid using geosphere. Argument
dmethod should match one of the distance functions allowed for argument fun in geosphere::distm.
A vector of matrix containing distances between the points.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.