Skip to contents

Prints the first rows of the simulation results in wide format. For a statistical summary per variable use summary().

Usage

# S3 method for class 'simulate_stockflow'
print(x, ...)

Arguments

x

A simulation result of class simulate_stockflow

...

Additional arguments (unused)

Value

Invisibly returns x

Examples

sfm <- stockflow("sir")
sim <- simulate(sfm)
print(sim)
#> 
#> ── Stock-and-Flow Simulation: Susceptible-Infected-Recovered (SIR) ─────────────
#> 
#> ── Data (first rows) ──
#>   time infected  recovered susceptible
#> 1 0.00 1.000000 0.00000000    99999.00
#> 2 0.01 1.019000 0.00100000    99998.98
#> 3 0.02 1.038361 0.00201900    99998.96
#> 4 0.03 1.058089 0.00305736    99998.94
#> 5 0.04 1.078193 0.00411545    99998.92
#> 
#>  Access with `as.data.frame()` • Visualise with `plot()`