View source: R/preprocessing.R
add_horizon | R Documentation |
Add missing values for future dates
add_horizon(data, horizon, accumulate = 1L, obs_column = "confirm", by = NULL)
data |
Data frame with a |
horizon |
Deprecated; use |
accumulate |
The number of days to accumulate when generating posterior prediction, e.g. 7 for weekly accumulated forecasts. |
obs_column |
Character (default: "confirm"). If given, only the column specified here will be used for checking missingness. This is useful if using a data set that has multiple columns of hwich one of them corresponds to observations that are to be processed here. |
by |
Character vector. Name(s) of any additional column(s) where data processing should be done separately for each value in the column. This is useful when using data representing e.g. multiple geographies. If NULL (default) no such grouping is done. |
A data.table with missing values for future dates
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.