Manages a global sample design matrix/data frame by setting or retrieving it.
This object is typically a matrix with one column per input parameter and one row per sample, or
the output of sensitivity::sensitivity functions. It can be used as
default input in eval_module().
Arguments
- data
(matrix, data frame, or list, optional). Sample design to store globally. Accepts a matrix/data frame or a list with a matrix in element
X(typically output of sensitivity::sensitivity functions). IfNULL, returns the current global sample design. Default:NULL.
Value
Current or newly set sample design (list with elements sa and
X) or NULL if no sample design has been set.
Examples
# Get current sample design (NULL if not set)
current_sample_design <- set_sample_design()
# Set sample design
X <- data.frame(a = c(0.1, 0.2), b = c(1, 2))
set_sample_design(X)
#> sample_design set to X
# Reset sample design
reset_sample_design()
#> sample_design reset
