View source: R/ct_find_break.R
| ct_find_break | R Documentation |
Identifies breaks in a sequence of datetime observations based on a specified time threshold.
ct_find_break(
data,
datetime_column,
format,
threshold = 10,
time_unit = "hours"
)
data |
A data frame containing the datetime column. |
datetime_column |
The datetime column. |
format |
Optional. A character string specifying the datetime format, passed to |
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". |
A tibble with columns start, end, and duration
showing the start and end of each break and its length.
library(dplyr)
data(penessoulou)
pene <- penessoulou %>%
dplyr::filter(project == "Last")
set_cam <- pene %>%
dplyr::filter(camera == "CAMERA 3")
ct_find_break(data = pene, datetime_column = "datetimes",
threshold = 5, time_unit = "days")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.