fisher_test_df | R Documentation |
NAs must be taken into account when formulating the conditions below, if desired.
fisher_test_df(df, cond1, cond2, alternative = "two.sided", ...)
df |
tibble |
cond1 |
quosure evaluating to a logical for condition 1 |
cond2 |
quosure evaluating to a logical for condition 2 |
alternative |
default="two.sided", see fisher.test(). |
... |
further arguments to |
The matrix (returned if verbose=TRUE
) is constructed with cond1
and !cond1 for the first and second row, respectively; likewise with cond2
and !cond2 for the first and second column, respectively
p value and odds ratio (c1c2/!c1c2) / (c1!c2/!c1!c2)
df <- data_frame(a=1:10, b=4:13)
fisher_test_df(df, quo(a < 4), quo(b < 7))
fisher_test_df(df, quo(a > 2), quo(b < 8))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.