cat_xtable: Compute contigency table

Description Usage Arguments Value

Description

Computes contingency table for one independent (column) variable and one or more dependent (row) variables. Optionally computes Chi² test.

Usage

1
cat_xtable(data, col.var, ..., percentages = FALSE, chisq = FALSE)

Arguments

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.

Value

A tibble with the contingency table.


joon-e/jutilities documentation built on May 28, 2019, 7:34 p.m.