pivot_forecasts_wider: Return a data frame of forecasts with predictive quantiles in...

View source: R/pivot_forecasts_wider.R

pivot_forecasts_widerR Documentation

Return a data frame of forecasts with predictive quantiles in columns.

Description

Return a data frame of forecasts with predictive quantiles in columns.

Usage

pivot_forecasts_wider(forecast_data, quantiles = NULL)

Arguments

forecast_data

required data.frame with forecasts in the format returned by load_forecasts(). It has columns model,forecast_date,location, target, type, quantile, value, horizon and target_end_date.

quantiles

vector of quantiles to return for plotting Default to all available quantiles in forecast_data. Note that point forecasts and median quantiles do not necessarily align. Throws an error if quantile levels are not in the forecast data.

Value

data.frame with columns model, forecast_date, location, horizon, temporal_resolution, target_variable, target_end_date, type, point, point_type, ⁠Prediction Interval⁠, upper, lower.


reichlab/covidHubUtils documentation built on Feb. 6, 2024, 1:42 p.m.