Description Usage Arguments Details Examples
View source: R/misc_functions.R
Appends two columns to a data frame containing Longitude and Latitude coordinates. The first column (Dist) is the incremental change in distance between coordinates. The second column (DistTotal) is the cumulative distance along a 2D transect beginning at 0.
1 |
longlat |
logical for calculating Great Circle (TRUE) or Euclidean (FALSE) distances. Defaults to TRUE. Great Circle distance is returned in km. |
x |
data frame containing coordinate data as columns labeled "Longitude" (x) and "Latitude" (y). |
Relies on the spDistsN1 function from the package 'sp.'
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.