complete_dates: Complete a data frame with missing combination of variables...

View source: R/dates-manipulation.R

complete_datesR Documentation

Complete a data frame with missing combination of variables (date and group)

Description

Complete a data frame with missing combination of variables (date and group)

Usage

complete_dates(x, group = "id", time_step = "days")

Arguments

x

data.frame with a column date

group

character vector of group variables

time_step

character scalar (e.g., "hours", "days", "months")

Value

tibble with a regular and constant time step

See Also

Other date manipulation: dates_from_files()

Examples

if(TRUE){
 dates_comp <- complete_dates(
   x = dates_miss,
   group = c("id", "g"),
   time_step = "months"
 )
dates_comp
}

lhmet/lhmetools documentation built on July 26, 2024, 1:48 p.m.