Learn R Programming

simstudy (version 0.9.0)

grouped: 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(...)

Value

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

Arguments

...

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

See Also

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

Examples

Run this code
# Define two grouped parameters of equal length
g <- grouped(x = 1:3, y = c(10, 20, 30))
g

Run the code above in your browser using DataLab