Description Usage Arguments Value
View source: R/crosstab_percent.R
Calculates percents for contingency tables (cross tabulations), by default selects the first n-2 variables (variable n is the number of observations, n-1 is the default omitted column)
1 | crosstab_percent(data_crosstab, n_var = "n", vars = c(), formatted = FALSE)
|
data_crosstab |
A contingency table or tibble/data frame of a contingency table |
n_var |
The name of the variable which contains frequencies |
vars |
A character vector of variable names |
formatted |
If "TRUE", percents of frequencies will be a character vector with rounded percents and a percent sign (%), otherwise the raw decimal integers will be returned |
A contingency table as a tibble
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.