View source: R/General_Functions.R
getDT | R Documentation |
Calculates the time between between the current location and the previous location in a track.
getDT(time, units = "hours")
time |
A vector of time values in POSIXct format. |
units |
The units of time for the output (eg. "days","hours","min","sec") |
A numeric vector of values in the requested time unit, giving the time between each location in the track and the previous location.
This function assumes that time 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.