Learn R Programming

sdbuildR (version 2.0.0)

tail.simulate_stockflow: Print last rows of a simulation

Description

Print the last rows of a simulation data frame of a stock-and-flow model. This is a wrapper around tail() that first converts the simulation results to a data frame using as.data.frame().

Usage

# S3 method for simulate_stockflow
tail(x, n = 6L, ...)

Value

A data.frame with the last rows of the simulation results.

Arguments

x

Output of simulate().

n

Number of rows to print. Defaults to 6.

...

Other arguments passed to as.data.frame.simulate_stockflow().

Examples

Run this code
sfm <- stockflow("SIR")
sim <- simulate(sfm)
tail(sim)

Run the code above in your browser using DataLab