extract_gaps | R Documentation |
Finds and extracts gap episodes from a dataset. If no variable is provided, it will look for implicit gaps (gaps in the regular interval), if a variable is provided, it will look for implicit and explicit gaps (NA in the variable)
extract_gaps(
dataset,
Variable.colname = NULL,
Datetime.colname = Datetime,
epoch = "dominant.epoch",
full.days = TRUE,
include.implicit.gaps = TRUE
)
dataset |
A light logger dataset. Needs to be a dataframe. |
Variable.colname |
Column name of the variable to check for NA values. Expects a symbol or NULL (only implicit gaps). |
Datetime.colname |
The column that contains the datetime. Needs to be a
|
epoch |
The epoch to use for the gapless sequence. Can be either a
|
full.days |
If |
include.implicit.gaps |
Logical. Whether to expand the datetime sequence
and search for implicit gaps, or not. Default is |
A dataframe containing gap times per grouping variable
Other regularize:
dominant_epoch()
,
gap_finder()
,
gap_handler()
,
gapless_Datetimes()
,
has_gaps()
,
has_irregulars()
#removing some data to create gaps
sample.data.environment |>
dplyr::filter(MEDI <= 50000) |>
extract_gaps() |> head()
#not searching for implicit gaps
sample.data.environment |>
dplyr::filter(MEDI <= 50000) |>
extract_gaps(MEDI, include.implicit.gaps = FALSE)
#making implicit gaps explicit changes the summary
sample.data.environment |>
dplyr::filter(MEDI <= 50000) |>
gap_handler()|>
extract_gaps(MEDI, include.implicit.gaps = FALSE) |> head()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.