Skip to contents

Convenience wrapper around enemdu_tabulate() for two-dimensional tabulations.

Usage

enemdu_tabulate_two_way(
  data,
  row_var,
  col_var,
  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.

row_var

Row grouping variable.

col_var

Column grouping variable.

value

Optional value variable.

weight

Optional weight variable. Defaults to "fexp" if present.

statistic

One of "count", "sum", "mean" or "proportion".

measure

Optional name for the output measure.

na_rm

Logical. If TRUE, missing values in value are excluded.

drop_na_groups

Logical. If TRUE, records with missing row/column values are excluded.

sample_n_min

Minimum unweighted sample size for preliminary flag.

Value

A tibble with one row per row/column combination.