collect_simulations() groups together an arbitrary number of objects with class stansim_simulation or stansim_collection into a single stansim_collection object. Allows for multiple simulations to be stored, saved, analysed and managed in a single object.

collect_simulations(collection_name, object, ...)

Arguments

collection_name

A name attached to the stansim_collection object to help identify it. It is strongly recommended that an informative and unique name is assigned.

object

An object of class stansim_simulation or stansim_collection. Must be provided.

...

Any further stansim_simulation or stansim_collection objects to be grouped into a single stansim_collection object.

Value

An S3 object of class stansim_simulation recording relevant simulation data.

Examples

# NOT RUN {
# group together stansim_simulation objects
collection_basic <- collect_simulations("Linear Regression Study", simulation1,
                            simulation2)

# group together stansim_simulations and stansim_collections
collection_extended <- collect_simulations("Extended Lin Reg Study", collection_basic,
                               simulation3)

# group together multiple stansim_collections
merged_collections <- collect_simulations("merged collections", collection_extended,
                              collection_additional)
# }