View source: R/get-from-simulation.R
output | R Documentation |
Returns either the output object itself or a reference to it.
output(sim, ..., subset = NULL, index, methods, reference = FALSE)
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 |
index |
a vector of positive integers specifying which draws' objects are desired. If missing, then all draws' outputs are returned. |
methods |
character vector of method names of interest. If missing, then all methods' outputs are returned |
reference |
whether to return the ModelRef or the Model object itself |
## Not run: # suppose previously we had run the following: sim <- new_simulation(name = "normal-example", label = "Normal Mean Estimation", dir = tempdir()) %>% generate_model(make_my_example_model, n = 20) %>% simulate_from_model(nsim = 50, index = 1:3) %>% run_method(my_example_method) # then we could get the method's output as follows: o <- output(sim) o@out$r1.1 # first random draw's output ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.