Description Usage Arguments Value Examples
Add NA values to the tail of a wide data.table to be filled by forecasting routines
1 2 3 4 5 6 | add_forecast_dates(
dt,
horizon = 1,
frq = c("month", "week", "quarter", "year"),
date_name = "ref_date"
)
|
dt |
data.table in wide format |
horizon |
number of periods to add at specified 'frq' |
frq |
frequency for aggregation, one of '"month"', '"week"', '"quarter"', or '"year"' |
date_name |
name of date column |
NA-filled data.table in wide format
1 | add_forecast_dates(fred[series_name == "gdp constant prices"],frq="quarter")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.