t<- as.table(rbind(c(2, 8, 30), c(6,16,18), c(1,13,26)))
dimnames(t) <- list(group=c("甲","乙","丙"),effect=c("低","中","高"))
chisq.test(t)
fisher.test(t)
#Fisher's Exact Test for Count Data
#data: t
#p-value = 0.03694
#alternative hypothesis: two.sided
install.packages("rcompanion")
library(rcompanion)
pairwiseNominalIndependence(t,fisher=T,gtest = F,chisq = F,method="fdr")