fill_dates | R Documentation |
Fill missing date values in a dataframe.
fill_dates( dataframe, identifier = NA, date_col, min_date = NA, max_date = NA, time_sequence, fill_data = list(NA) )
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. |
A dataframe with missing entries filled.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.