Learn R Programming

EpiNow2 (version 1.8.0)

format_sample_predictions: Format sample predictions

Description

Helper function to format posterior samples into the structure expected by scoringutils::as_forecast_sample().

Usage

format_sample_predictions(samples, forecast_date)

Value

Data.table with columns: forecast_date, date, horizon, sample, predicted

Arguments

samples

Data.table with date, sample, and value columns

forecast_date

Date when the forecast was made