我想通过编程创建95%的置信区间,如何在geom_errorbar()中设置mean_se的mult参数?
geom_errorbar()
mean_se
mult
mtcars %>% ggplot(aes(factor(cyl), hp)) + geom_bar(stat = "summary", fun = mean, na.rm = TRUE) geom_errorbar(stat = "summary", width = .3)
bxpogfeg1#
作为开始
library(ggplot2) ggplot(mtcars, aes(factor(cyl), hp)) + geom_bar(stat = "summary", fun = mean, na.rm = TRUE) + stat_summary( fun.data = "mean_se", fun.args = list(mult = 1.96), geom = "errorbar", width = 0.3 )
创建于2023年2月15日,使用reprex v2.0.2
1条答案
按热度按时间bxpogfeg1#
作为开始
创建于2023年2月15日,使用reprex v2.0.2