fill_dates: Fill in missing dates in a dataframe with intermittent dates

Description Usage Arguments Value Examples

View source: R/fill_dates.R

Description

Fill in missing dates in a dataframe with intermittent dates

Usage

1
fill_dates(df, date_col, start_date, end_date)

Arguments

df

a dataframe where at least 1 column has dates

date_col

name of the column that has dates

start_date

start date, e.g. "2019-01-01"

end_date

end date, e.g. "2019-02-01"

Value

the dataframe you started with, expanded to include all missing dates as rows

Examples

1
2
df <- data.frame(dates = c("2019-01-01", "2019-02-01"), numbers = c(3,4))
df %>% fill_dates(dates, "2019-01-01", "2019-02-08")

nayefahmad/denodoExtractor documentation built on Nov. 14, 2019, 4:33 p.m.