Produces a stable long-format tabulation using optional grouping variables, a value variable, and an optional expansion factor.
Usage
enemdu_tabulate(
data,
group_vars = NULL,
value = NULL,
weight = "fexp",
statistic = c("count", "sum", "mean", "proportion"),
measure = NULL,
na_rm = TRUE,
drop_na_groups = TRUE,
sample_n_min = 60
)Arguments
- data
A data frame.
- group_vars
Optional character vector of grouping variables.
- value
Optional value variable. Required for
"sum","mean"and"proportion".- weight
Optional weight variable. Defaults to
"fexp"if present. IfNULL, unweighted calculations are performed.- statistic
One of
"count","sum","mean"or"proportion".- measure
Optional name for the output measure.
- na_rm
Logical. If
TRUE, missing values invalueare excluded from sum, mean, and proportion calculations.- drop_na_groups
Logical. If
TRUE, records with missing values in any grouping variable are excluded.- sample_n_min
Minimum unweighted sample size used for a preliminary sample-size flag. Defaults to
60.