aggregate_pers {manifestoR} | R Documentation |
Aggregate category percentages in groups
Description
aggregate_pers
is a general function to aggregate percentage variables by creating a new
variable holding the sum. If a variable with the name for the aggregate
already exists and if it is part of the 'overwrite' parameter, it is
overwritten.
Usage
aggregate_pers(
data,
groups = v5_v4_aggregation_relations(),
na.rm = FALSE,
keep = FALSE,
overwrite = names(groups),
verbose = TRUE
)
Arguments
data |
dataset to use in aggregation |
groups |
(named) list of variable name vectors to aggregate to a new one (as given in the name); see default value for an example of the format |
na.rm |
passed on to |
keep |
keep variables that were aggregated in result? |
overwrite |
Names of the variables that are allowed to be overwritten by aggregate. Defaults to all aggregate variable names. |
verbose |
show messages in case of possibly problematic side effects |
See Also
[Package manifestoR version 1.6.0 Index]