Skip to contents

Gets the final state of a model from either a `roleExperiment` or a `roleModel`.

Usage

getFinalState(x, modID, ...)

Arguments

x

The `roleExperiment` or `roleModel` object to retrieve the final state from.

modID

Optional argument to retrieve the final state for specific model(s) in a `roleExperiment` object; can be a vector of unique IDs.

Details

If `modID` is not supplied and `x` is a `roleExperiment`, then a list of `roleData` objects for each model run is returned.

Examples

# get the final state of a roleModel as a roleModel (but maybe should be roleData?)
m <- quickModel()
final_data <- getFinalState(m)@modelSteps[[1]]