fill_dates: Fill Dates

View source: R/fill_dates.R

fill_datesR Documentation

Fill Dates

Description

Fill missing date values in a dataframe.

Usage

fill_dates(
  dataframe,
  identifier = NA,
  date_col,
  min_date = NA,
  max_date = NA,
  time_sequence,
  fill_data = list(NA)
)

Arguments

dataframe

The original data with missing entries for certain dates.

identifier

A unique identifier to split the data by, such as a customer ID, product ID, etc.

date_col

The date column of the dataframe.

min_date

The minimum date in the range that you want to fill. If left blank, then the minimum value in the data is taken.

max_date

The maximum date in the range that you want to fill. If left blank, then the maximum value in the data is taken.

time_sequence

The interval between dates, either "day", "week", "month", "quarter", or "year".

fill_data

The data that should be filled for missing values. Default are NAs. Should be a list in the form of column_name = value.

Value

A dataframe with missing entries filled.


matthiasronnau/matthias documentation built on June 15, 2022, 11:44 p.m.