Hi guys I am running a statistical test with a follow up of a Dunnetts-Test using this code:
dun_4h_noS9 <- DunnettTest(x=fourh_noS9_table$MN_rate, g=fourh_noS9_table$Dose, control ="0")
which works great and I get the output:
Dunnett's test for comparing several treatments with a control :
95% family-wise confidence level
$`0`
diff lwr.ci upr.ci pval
0.01-0 0.0667 -1.9119 2.0452 1.0000
0.03-0 0.0167 -1.9619 1.9952 1.0000
0.08-0 -0.0667 -2.0452 1.9119 1.0000
0.25-0 -0.0333 -2.0119 1.9452 1.0000
0.74-0 0.2222 -1.7563 2.2008 1.0000
2.22-0 1.2833 -0.6952 3.2619 0.3704
6.67-0 6.6056 4.6270 8.5841 <2e-16 ***
20-0 28.8853 26.9067 30.8639 <2e-16 ***
Mitomycin C -0 12.6833 10.7048 14.6619 <2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
When trying to save that list to a tibble I keep loosing the Information about which groups were compared in the test and also the significancies ( which is not that much of a problem):
tibble <- map(dun_4h_noS9,~data.frame(.))
tibble<-map_dfr(tibble,~mutate_all(.,as.character))
Output:
diff lwr.ci upr.ci pval
1 0.0667 -1.9119 2.0452 1
2 0.0167 -1.9619 1.9952 1
3 -0.0667 -2.0452 1.9119 1
4 -0.0333 -2.0119 1.9452 1
5 0.2222 -1.7563 2.2008 1
6 1.2833 -0.6952 3.2619 0.3704
7 6.6056 4.627 8.5841 0
8 28.8853 26.9067 30.8639 0
9 12.6833 10.7048 14.6619 0
Does a way exist where I can keep the infos about the group comparissons?
Thankyou for your help
question from:
https://stackoverflow.com/questions/66061884/r-function-to-save-posthoc-test-results-in-dataframe 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…