Creates a contingency table by group from paired/clustered data, optionally combining lower and upper triangles.
grouptable(
data,
id,
group,
var,
lower = TRUE,
labels,
order,
group.labels,
group.order,
combine = " & ",
...
)A table or list of tables.
a data.frame.
name of the cluster/pair identifier column.
name of the grouping variable (e.g., zygosity).
name of the outcome variable to tabulate.
logical; if TRUE, fold upper triangle into lower.
optional labels for levels of var.
optional ordering of factor levels.
optional labels for the groups.
optional ordering of groups.
separator for combining two groups (default " & ").
additional arguments.