| gap_finder | R Documentation |
Quickly check for implicit missing Datetime data. Outputs a message with a
short summary, and can optionally return the gaps as a tibble. Uses
gap_handler() internally.
gap_finder(
dataset,
Datetime.colname = Datetime,
epoch = "dominant.epoch",
gap.data = FALSE,
silent = FALSE,
full.days = FALSE
)
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
|
gap.data |
Logical. If |
silent |
Logical. If |
full.days |
If |
The gap_finder() function is a wrapper around gap_handler() with the
behavior argument set to "gaps". The main difference is that
gap_finder() returns a message with a short summary of the gaps in the
dataset, and that the tibble with the gaps contains a column gap.id that
indicates the gap number, which is useful to determine, e.g., the consecutive
number of gaps between measurement data.
Prints message with a short summary of the gaps in the dataset. If
gap.data = TRUE, returns a tibble of the gaps in the dataset.
Other regularize:
dominant_epoch(),
extract_gaps(),
gap_handler(),
gapless_Datetimes(),
has_gaps(),
has_irregulars()
dataset <-
tibble::tibble(Id = c("A", "A", "A", "B", "B", "B"),
Datetime = lubridate::as_datetime(1) +
lubridate::days(c(0:2, 4, 6, 8)) +
lubridate::hours(c(0,12,rep(0,4)))) %>%
dplyr::group_by(Id)
dataset
#look for gaps assuming the epoch is the dominant epoch of each group
gap_finder(dataset)
#return the gaps as a tibble
gap_finder(dataset, gap.data = TRUE)
#assuming the epoch is 1 day, we have different gaps, and the datapoint at noon is now `irregular`
gap_finder(dataset, epoch = "1 day")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.