问题描述
我想将成对 t 检验中的 p 值添加到此循环创建的每个图形中:
Facets <- BlLongerFull %>%
group_by(Variable) %>%
doo(
~ggBoxplot(data = .,x="Grouping",y="Prop"),result = "plots"
)
Facets
Variable <- Facets$Variable
for(i in 1:length(Variable)){
graph.i <- Facets$plots[[i]]+
labs(title = Variable[i])+
stat_pvalue_manual(pwc[i,],label = "p")
print(graph.i)
}
我使用 rstatix 进行了成对 t 检验
pwc <- BlLongerFull %>%
group_by(Variable) %>%
pairwise_t_test(Prop~Grouping) %>%
add_xy_position(x="Grouping")
图形最终看起来像这样
如何获取 stat_pvalue 以将所有 p 值添加到循环中的每个图形?
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)