align_forecasts_one_temporal_resolution | R Documentation |
Internal function that add reference dates and relative horizons to a dataframe of forecasts. This function requires that the forecasts data frame contains only forecasts one temporal_resolution, i.e., only at the daily resolution or the weekly resolution.
align_forecasts_one_temporal_resolution(
forecasts,
reference_dates,
reference_weekday,
reference_windows,
drop_nonpos_relative_horizons
)
forecasts |
dataframe in format returned by |
reference_dates |
a vector of reference dates for forecasts, grouping
forecasts that were made during the same week. May be a character vector in
the format "YYYY-MM-DD" or a vector of Dates. For example, if a forecast of
daily hospitalizations is issued with a forecast date that is Saturday,
2021-09-04, and we want to align analyses around a Monday, the reference
date would be Monday, 2021-09-06. This can be accomplished more easily by
providing the |
reference_weekday |
capitalized weekday, e.g. "Monday". The day of week
to use for reference dates, if the |
reference_windows |
an integer vector of offset values indicating the
set of forecast dates should be assigned to a particular reference date,
in units of number of days. If the |
drop_nonpos_relative_horizons |
boolean indicating whether forecasts that have a
non-positive horizon relative to the reference date should be dropped.
Defaults to |
forecast dataframe augmented by columns reference_date and relative_horizon
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.