expand.arg {secrdesign}R Documentation

Expand Argument List

Description

Generate a list of lists from vectors of argument values.

Usage


expand.arg(..., sublist = list())

Arguments

...

named vectors of argument values

sublist

named list of character vectors

Details

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).

Value

A list of lists. A flat dataframe of combinations is returned as the attribute 'comb'.

See Also

run.scenarios

Examples


## 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')))


[Package secrdesign version 2.9.1 Index]