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 (55.6) 194 (44.4) 0.894 #> 4 Male 268 (56.1) 210 (43.9) #> 1 Obstruction No 408 (56.7) 312 (43.3) 0.203 #> 2 Yes 89 (51.1) 85 (48.9)