fv_example | R Documentation |
Loads examples of posterior and forecast summaries produced
using example scripts. Used to streamline examples,
in package tests and to enable users to explore package functionality
without needing to install cmdstanr
.
fv_example(strains = 1, type = "posterior")
strains |
Integer number of strains. Defaults to 2. Current maximum is 2. |
type |
A character string indicating the example to load.
Supported options are "posterior", "forecast", "observations",
and "script" which are the
output of |
A data.table
of summarised output
Package data sets
germany_covid19_delta_obs
# Load the summarised posterior from an example fit of the one strain model
fv_example(strains = 1, type = "posterior")
# Load the summarised forecast from this posterior
fv_example(strains = 1, type = "forecast")
# Load the script used to generate these examples
# Optionally source this script to regenerate the example
readLines(fv_example(strains = 1, type = "script"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.