| .distance_result_from_coords | R Documentation |
Helper function takes a vector of locations, and a set of coords (which must be a matrix or frame with first two columns being longitude and latitude), and returns a square distance matrix for all pairs of coordinates in a given unit
.distance_result_from_coords(
loc_vec,
coords,
unit = c("miles", "kilometers", "meters")
)
loc_vec |
Character vector of location identifiers used as matrix row/column names. |
coords |
Matrix-like object with longitude in column 1 and latitude in column 2. |
unit |
Character scalar unit for returned distances; one of
|
A list with elements loc_vec and distance_matrix.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.