expand.arg | R Documentation |
Generate a list of lists from vectors of argument values.
expand.arg(..., sublist = list())
... |
named vectors of argument values |
sublist |
named list of character vectors |
The full 'pop.args', 'det.args' and 'fit.args' arguments of run.scenarios
are lists of lists corresponding to the popindex, detindex and fitindex columns in scenarios.
expand.arg
constructs such lists from all possible combinations of specified arguments, with invariant arguments appended.
sublist
may be specified to shift one or more named subsets of ... arguments to a sub-list such as 'detectpar' (see Examples).
A list of lists. A flat dataframe of combinations is returned as the attribute 'comb'.
run.scenarios
## generate some arguments for sim.capthist
## noccasions is constant
expand.arg(detectfn = c('HN','EX'), noccasions = 5)
## detectpar sub-list
expand.arg(lambda0 = c(0.1, 0.2), sigma = 20, detectfn = c('HHN','HEX'),
sublist = list(detectpar = c('lambda0','sigma')))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.