当调用 pubr 的 stat_pvalue_manual 函数时:
ggplot + stat_pvalue_manual(statistics, label = "p.adj.signif",
coord.flip = TRUE,
#hide.ns = TRUE,
tip.length = 0,
bracket.size = 0)+coord_flip()
生成以下图表:
然而,人们只对重要的数据感兴趣,因此通过调用 hide.ns = TRUE 来省略 ns 数据,如下所示:
ggplot + stat_pvalue_manual(statistics, label = "p.adj.signif",
coord.flip = TRUE,
hide.ns = TRUE,
tip.length = 0,
bracket.size = 0)+coord_flip()
这会在 ns 数据先前占用的地方创建空白空间,有没有办法删除它?
要计算 xy 位置,在统计对象中按如下方式完成:
statistics <- dataframe %>%
tukey_hsd(value~group) %>%
add_xy_position(fun = "mean_se", x= "group")
提前致谢!