splitAtGaps | R Documentation |
Defines a new ID variable, which changes where there is a long gap in
the data. This is sometimes useful for preprocessing data prior to using
prepData
.
splitAtGaps(data, maxGap = 60, shortestTrack = 0, units = "mins")
data |
Data frame with (at least) columns for "ID" and "time" |
maxGap |
Longest allowed gap, in minutes by default (but see argument "units"). Track will be split at longer gaps. |
shortestTrack |
Shortest track to keep after splitting, in minutes. Shorter tracks will be removed from the output data set. |
units |
Character string, e.g., "mins" (default), "secs", "hours", "days". Time units used for the maxGap and shortestTrack arguments. |
Data frame with identical structure as input, where ID column has been replaced by new ID for split tracks. Old ID still accessible as ID_old column
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.