gapless_Datetimes | R Documentation |
Create a gapless sequence of Datetimes. The Datetimes are determined by the minimum and maximum Datetime in the dataset and an epoch. The epoch can either be guessed from the dataset or specified by the user.
gapless_Datetimes(
dataset,
Datetime.colname = Datetime,
epoch = "dominant.epoch",
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
|
full.days |
If |
A tibble
with a gapless sequence of Datetime
as specified by
epoch
.
Other regularize:
dominant_epoch()
,
gap_finder()
,
gap_handler()
dataset <-
tibble::tibble(Id = c("A", "A", "A", "B", "B", "B"),
Datetime = lubridate::as_datetime(1) +
lubridate::days(c(0:2, 4, 6, 8))) %>%
dplyr::group_by(Id)
dataset %>% gapless_Datetimes()
dataset %>% dplyr::ungroup() %>% gapless_Datetimes()
dataset %>% gapless_Datetimes(epoch = "1 day")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.