get_regional_results: Get Combined Regional Results

View source: R/get.R

get_regional_resultsR Documentation

Get Combined Regional Results

Description

[Stable] Summarises results across regions either from input or from disk. See the examples for details.

Usage

get_regional_results(
  regional_output,
  results_dir,
  date,
  samples = TRUE,
  forecast = FALSE
)

Arguments

regional_output

A list of output as produced by regional_epinow() and stored in the regional list.

results_dir

A character string indicating the folder containing the {EpiNow2} results to extract.

date

A Character string (in the format "yyyy-mm-dd") indicating the date to extract data for. Defaults to "latest" which finds the latest results available.

samples

Logical, defaults to TRUE. Should samples be returned.

forecast

Logical, defaults to FALSE. Should forecast results be returned.

Value

A list of estimates, forecasts and estimated cases by date of report.

Examples

# get example multiregion estimates
regional_out <- readRDS(system.file(
    package = "EpiNow2", "extdata", "example_regional_epinow.rds"
))

# from output
results <- get_regional_results(regional_out$regional, samples = FALSE)

EpiNow2 documentation built on Oct. 31, 2024, 5:09 p.m.