stat_two_cat | R Documentation |
Create a frequency table with chi-square statistic, p-value, cramer's v.
stat_two_cat(df, grp_var, vars, filter = "")
df |
A single data.frame |
grp_var |
A character variable from a data.frame |
vars |
One or more variables from a data.frame |
filter |
A character single value (default = ”), that will be the value to filter the variables |
A gt table.
mtcars %>%
dplyr::mutate(vs = paste0("vs = ",vs)) %>%
stat_two_cat(grp_var = vs,vars = c(am,cyl))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.