View source: R/run_subgroup_sims.R
| validate_subgroups | R Documentation |
Evaluates every subgroup id expression against data (augmented
with flag_itt = 1L, the scalar cutpoints as columns, and 0-valued
benchmark membership columns) and fails with a named, collected error
if any expression errors, is non-logical, or has the wrong length.
Run automatically at the top of run_subgroup_sims() so that a typo
in a subgroup definition stops the study in milliseconds instead of
surfacing as a silent all-NA column after the simulation loop.
validate_subgroups(
subgroups,
data,
cutpoints = list(),
benchmarks = benchmark_spec()
)
subgroups |
List of subgroup definitions; each element a list
with character scalars |
data |
A data frame carrying the covariates the |
cutpoints |
Named list of scalars exposed as columns (e.g.
|
benchmarks |
A |
Invisibly TRUE; errors otherwise.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.