expand_dates: expand dates between start_date and end_date

View source: R/check_dates.R

expand_datesR Documentation

expand dates between start_date and end_date

Description

expand dates between start_date and end_date

Usage

expand_dates(d, by)

Arguments

d

data.frame or tibble with columns called 'start_date' and 'end_date'

by

time interval to expand dates (e.g., 'day', 'week', etc)

Value

long data.frame or tibble with column called 'date' including all dates between start_date and end_date

Examples

## Not run: 
d <- data.frame(
  start_date = check_dates(c("1/1/21", "1/2/21", "1/3/21")),
  end_date = check_dates(c("1/7/21", "1/8/21", "1/9/21"))
)
expand_dates(d, by = "day")

## End(Not run)

degauss-org/dht documentation built on Oct. 28, 2023, 1:20 a.m.