Identifies breaks in a sequence of datetime observations based on a specified time threshold.
Arguments
- data
A data frame containing the datetime column.
- datetime_column
The datetime column.
- format
Optional. A character string specifying the datetime format, passed to
as.POSIXlt.- threshold
A numeric value indicating the minimum gap to be considered a break (default is 10).
- time_unit
The unit for the threshold. Supported values include "secs", "mins", "hours", "days", and "weeks".
Value
A tibble with columns start, end, and duration
showing the start and end of each break and its length.
