View source: R/General_Functions.R
getDist | R Documentation |
Calculates the distance between the current location and the previous location in a track.
getDist(lon, lat)
lon |
A vector of longitude values. |
lat |
A vector of latitude values. |
A vector of values (in km) giving the distance between each location in the track and the previous location.
This function assumes that longitude and latitude values are in chronological order and all values are from a single individual. Make sure that your data are ordered, and use a for loop or some other method to apply this to multiple tracks
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.