View source: R/statistical_tests.R
fisher.test | R Documentation |
stats::fisher.test()
to a two-way tabylThis generic function overrides stats::fisher.test()
. If the passed table
is a two-way tabyl, it runs it through janitor::fisher.test.tabyl
, otherwise
it just calls stats::fisher.test()
.
fisher.test(x, ...)
## Default S3 method:
fisher.test(x, y = NULL, ...)
## S3 method for class 'tabyl'
fisher.test(x, ...)
x |
A two-way tabyl, a numeric vector or a factor |
... |
Parameters passed to |
y |
if x is a vector, must be another vector or factor of the same length |
The same as the one of stats::fisher.test()
.
tab <- tabyl(mtcars, gear, cyl)
fisher.test(tab)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.