powered by
Computes contigency table for one independent (column) variable and one or more dependent (row) variables.
crosstab(data, col_var, ..., add_total = FALSE, percentages = FALSE, chi_square = FALSE)
a tibble
Independent (column) variable.
Dependent (row) variables.
Logical indicating whether a 'Total' column should be computed. Defaults to FALSE.
FALSE
Logical indicating whether to output column-wise percentages instead of absolute values. Defaults to FALSE.
Logical indicating whether a Chi-square test should be computed. Test results will be reported via message(). Defaults to FALSE.
Other categorical: cramer_V, tab_frequencies
cramer_V
tab_frequencies
# NOT RUN { WoJ %>% crosstab(reach, employment) WoJ %>% crosstab(reach, employment, add_total = TRUE, percentages = TRUE, chi_square = TRUE) # }
Run the code above in your browser using DataLab