Skip to contents

Given a simulation, creates a new simulation that is a subset of the preexisting simulation. Does not save this new one to file. To do so, first change the name (and, potentially, label) of the simulation and then use save_simulation. If you call save_simulation before changing the name, you will overwrite the preexisting simulation. Use rename and relabel.

Usage

subset_simulation(sim, ..., subset = NULL, index, methods)

Arguments

sim

a simulation object

...

logical conditions to specify a subset of models. Conditions can only involve params of model that have length 1 and are of class numeric or character.

subset

a vector of integers indexing the models or a vector of model names. To select models based on parameter values, use .... However, using ... is slower than using subset.

index

a vector of positive integers specifying which draws' objects are desired. If missing, then all draws' evals are returned.

methods

character vector of method names of interest. If missing, then all methods' evals are returned