has_gaps | R Documentation |
Returns TRUE
if there are implicit gaps in the dataset and FALSE
if it is
gapless. Gaps can make sense depending on the grouping structure, but the
general sequence of Datetimes within a dataset should always be gapless.
has_gaps(dataset, Datetime.colname = Datetime, epoch = "dominant.epoch")
dataset |
A light logger dataset. Needs to be a dataframe. |
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
|
logical
Other regularize:
dominant_epoch()
,
extract_gaps()
,
gap_finder()
,
gap_handler()
,
gapless_Datetimes()
,
has_irregulars()
#The sample dataset does not have gaps
sample.data.environment |> has_gaps()
#removing some of the data creates gaps
sample.data.environment |> dplyr::filter(MEDI <= 50000) |> has_gaps()
#having a grouped dataframe where the groups span multiple unconnected parts
#is considered a gap, which can be relevant, e.g., when searching for clusters
sample.data.environment |>
add_photoperiod(c(47.1, 10)) |>
dplyr::group_by(photoperiod.state) |>
has_gaps()
#to avoid this, use `number_states()` for grouping
sample.data.environment |>
add_photoperiod(c(48.52, 9.06)) |>
number_states(photoperiod.state) |>
dplyr::group_by(photoperiod.state.count, .add = TRUE) |>
has_gaps()
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.