Description Usage Arguments Examples
A tidier version of chisq.test() for goodness of fit tests and tests of independence.
1 | chisq_test(data, formula, ...)
|
data |
A data frame that can be coerced into a tibble. |
formula |
A formula with the response variable on the left and the explanatory on the right. |
... |
Additional arguments for chisq.test(). |
1 2 3 4 | # chisq test for comparing number of cylinders against automatic/manual
mtcars %>%
dplyr::mutate(cyl = factor(cyl), am = factor(am)) %>%
chisq_test(cyl ~ am)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.