View source: R/ct_plot_camtrap_activity.R
| calc_active_periods | R Documentation |
Internal helper function to calculate continuous active periods based on gap detection.
calc_active_periods(data, threshold, time_unit)
data |
A data frame containing the datetime column. |
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 period_start and period_end columns.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.