Description Usage Arguments Value Author(s) Examples
This function calculates the geodesic distance between any dyads (pairs of points i
and j
) in a spatial dataset and stores the result in a long tibble
1 2 3 4 5 6 7 8 |
data |
an object of class |
id |
a variable uniquely identifying geospatial points. Can be of type numeric, integer, character, or factor |
crs_transform |
a logical value indicating whether to transform the CRS. Defaults to FALSE |
new_crs |
a valid EPSG for a new CRS. See |
diagonal |
a logical value. Keep the diagonal component in the distance matrix with dyads (i,i) and distance zero? Defaults to TRUE |
duplicates |
a logical value. Keep "identical" dyads (i,j) and (j,i)? Defaults to TRUE. If set to FALSE, only one observation per dyad is kept. Note that this uses rowwise and makes the ddist function considerably more time-consuming |
a long tibble with dyads and dyadic distances incl. a distance unit indicator
Jeppe Vierø
1 2 3 4 5 6 7 8 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.