prop_tests | R Documentation |
This is a convenient tidy wrapper for stats::prop.test()
prop_tests(
x,
group,
correct = T,
conf_level = 0.95,
alternative = c("two.sided", "less", "greater")
)
x |
A factor variable |
group |
A grouping variable |
correct |
a logical indicating whether Yates' continuity correction should be applied where possible. |
conf_level |
confidence level of the returned confidence interval. Must be a single number between 0 and 1. Only used when testing the null that a single proportion equals a given value, or that two proportions are equal; ignored otherwise. |
alternative |
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter. Only used for testing the null that a single proportion equals a given value, or that two proportions are equal; ignored otherwise. |
A data frame, which may have missing levels if a combination did not exist in the data.
prop_tests(mpg$cyl, mpg$manufacturer)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.