- data
A data frame. Alternatively, a vector when using the
vector-based interface.
- x
Row variable (unquoted).
- y
Column variable (unquoted). Mandatory; for one-way tables, use freq().
- by
Optional grouping variable or expression. Can be a single variable
or a combination of multiple variables (e.g. interaction(vs, am)).
- weights
Optional numeric weights.
- rescale
Logical. If FALSE (the default), weights are used as-is.
If TRUE, rescales weights so total weighted N matches raw N.
- percent
One of "none" (the default), "row", "column".
Unique abbreviations are accepted (e.g. "n", "r", "c").
- include_stats
Logical. If TRUE (the default), computes Chi-squared
and an association measure (see assoc_measure).
- assoc_measure
Character. Which association measure to report.
"auto" (default) selects Kendall's Tau-b when both variables are
ordered factors and Cramer's V otherwise. Other choices:
"cramer_v", "phi", "gamma", "tau_b", "tau_c",
"somers_d", "lambda", "none".
- assoc_ci
Logical. If TRUE, includes the 95 percent confidence
interval of the association measure in the note. Defaults to FALSE.
- correct
Logical. If FALSE (the default), no continuity correction is
applied. If TRUE, applies Yates correction (only for 2x2 tables).
- simulate_p
Logical. If FALSE (the default), uses asymptotic p-values.
If TRUE, uses Monte Carlo simulation.
- simulate_B
Integer. Number of replicates for Monte Carlo simulation.
Defaults to 2000.
- digits
Number of decimals. Defaults to 1 for percentages, 0 for counts.
- styled
Logical. If TRUE (the default), returns a spicy_cross_table object
(for formatted printing). If FALSE, returns a plain data.frame.
- show_n
Logical. If TRUE (the default), adds marginal N totals when
percent != "none".
- ...
Additional arguments passed to individual print methods.