Skip to contents

Check whether an object is a scenario

Usage

is_scenario(x)

Arguments

x

An R object.

Value

A logical indicating whether the object inherits from the class scenario.

Examples

# prepare two scenarios of the final size of an epidemic
pandemic_flu <- scenario(
  model_function = "finalsize::final_size",
  parameters = make_parameters_finalsize_UK(r0 = 1.5),
  replicates = 1L
)

is_scenario(pandemic_flu)
#> [1] TRUE