Fisher's exact test for use with summary_factorlist

catTestfisher(tab)

Arguments

tab

A frequency table such as that created by table().

Examples

explanatory = c("sex.factor", "obstruct.factor") dependent = "mort_5yr" colon_s %>% summary_factorlist(dependent, explanatory, p = TRUE, catTest = catTestfisher)
#> label levels Alive Died p #> 3 Sex Female 243 (47.6) 194 (48.0) 0.894 #> 4 Male 268 (52.4) 210 (52.0) #> 1 Obstruction No 408 (82.1) 312 (78.6) 0.203 #> 2 Yes 89 (17.9) 85 (21.4)