R !!!errorbar !平均±標準誤差 !標準誤差の計算 se = sd/sqrt(項目数) !!先に平均とSEを計算しておく !!ggplotの式の中で計算する {{pre g <- ggplot(sugi_iwa.dat) g <- g + aes(x=time, y= score, color=cond) g <- g + geom_point() g <- g + geom_jitter(width = 0.05) g <- g + facet_grid(rows = vars(cond)) g <- g + stat_summary(fun = mean, fun.min = function(x) mean(x) - sd(x), fun.max = function(x) mean(x) + sd(x), geom = "pointrange", color="black", size=0.7) g <- g + stat_summary(fun = mean, geom = "line", width=2) plot(g) }}