Description Usage Arguments Value
Computes contingency table for one independent (column) variable and one or more dependent (row) variables. Optionally computes Chi² test.
1 | cat_xtable(data, col.var, ..., percentages = FALSE, chisq = FALSE)
|
data |
A (tidy) dataset |
col.var |
Independent (column) variable. |
... |
Dependt (row) variable(s). |
percentages |
Logical indicating whether to output column-wise percentages instead of absolute values. Defaults to FALSE. |
chisq |
Logical indicating whether a Chi² test should be computed. Test will be reported via message(). Defaults to FALSE. |
A tibble with the contingency table.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.