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(...)
An object of class grouped_params
, essentially a named list
where all elements have the same length.
scenario_list
for generating scenario combinations
that make use of grouped parameters.
# 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"