如何解决R中箱线图中的图基显着性线
我正在尝试使用以下语法在我的箱线图中添加显着性线:
> my_comparisons <- list( c("Cluster 2L","Cluster 1L"),c("Cluster 3L",> "Cluster 1L"),"Cluster 2L") )
>
> B2 <- ggboxplot(VCPedu_LOW,x = "clustergroup",y =
> "Water_cons_m3_stnd",> main = "C",> palette = c("#00AFBB","#E7B800","#FC4E07"),> order = c("Cluster 1L","Cluster 2L","Cluster 3L"),> ylab = "Blue water use,in m3/1000 kcal",xlab = "",> ylim = c(0,0.6)) B2 + stat_compare_means(comparisons = my_comparisons) + stat_compare_means(label.y = 0.6,method =
> "anova")
这是我的结果:
但我的 Tukey 测试结果如下:
> Fit: aov(formula = VCPedu_LOW$Water_cons_m3_stnd ~ clustergroup,data
> = VCPedu_LOW)
$clustergroup
diff lwr upr p adj
Cluster 2L-Cluster 1L 0.01166782 0.0010159647 0.02231968 0.0277671
Cluster 3L-Cluster 1L 0.02468889 0.0154787818 0.03389900 0.0000000
Cluster 3L-Cluster 2L 0.01302107 0.0004250736 0.02561706 0.0408405*
有人可以帮助我将正确的 p 值放入我的箱线图中,包括显着性线吗?
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。