library(ggpubr)
library(ggplot2)
library(effsize)
p <- ggboxplot(d, x = "Class", y = "Response",
color = "Class", palette = "jco",
add = "jitter")
p + stat_compare_means(method = "t.test")
with(d, cohen.d(Response,Class))
我只想使用我的代码将Cohen的D添加到BoxPlot。
在这里是预期的结果
如果您想在ggpubr
框架内完成所有操作,则可以尝试:
FUN()