Utility function to combine several vectors of equal length into a grouped parameter object. This allows parameters that should vary together across scenarios to be treated as a unit in scenario_list.

grouped(...)

Arguments

...

One or more vectors of equal length to be grouped together. Each argument will be named according to the symbol provided.

Value

An object of class grouped_params, essentially a named list where all elements have the same length.

See also

scenario_list for generating scenario combinations that make use of grouped parameters.

Examples

# Define two grouped parameters of equal length
g <- grouped(x = 1:3, y = c(10, 20, 30))
g
#> $x
#> [1] 1 2 3
#> 
#> $y
#> [1] 10 20 30
#> 
#> attr(,"class")
#> [1] "grouped_params"