grouped: Mark parameters as grouped

View source: R/utility.R

groupedR Documentation

Mark parameters as grouped

Description

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.

Usage

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

simstudy documentation built on Dec. 1, 2025, 9:10 a.m.