agg_totals() was renamed to agg_variates() because the new name better
describes that the function aggregates mcnode variates across grouping
variables.
Usage
agg_totals(
mcmodule,
mc_name,
agg_keys = NULL,
agg_suffix = NULL,
prefix = NULL,
name = NULL,
summary = TRUE,
keep_variates = FALSE,
agg_func = NULL
)Arguments
- mcmodule
An
mcmoduleobject. Module containing node list and data.- mc_name
Character. Name of node to aggregate.
- agg_keys
Character vector, optional. Column names for grouping. If
NULL, defaults to"scenario_id". Default:NULL.- agg_suffix
Character, optional. Suffix for aggregated node name. Default:
NULL.- prefix
Character, optional. Prefix for output node name. Default:
NULL.- name
Character, optional. Custom name for output node. Default:
NULL.- summary
Logical. If
TRUE, include summary statistics. Default:TRUE.- keep_variates
Logical. If
TRUE, preserve individual variate values. Default:FALSE.- agg_func
Character, optional. Aggregation method:
"prob"for combined probability,"sum","avg", orNULLfor automatic selection. Default:NULL.
