エラーバーを加える

dfcであらかじめseの値を持っておいた上で)

ggplot(dfc, aes(x=dose, y=len, colour=supp)) + 
    geom_errorbar(aes(ymin=len-se, ymax=len+se), width=.1) +
    geom_line() +
    geom_point()

エラーバーのtick(?)の幅は widthで設定できる。

http://www.cookbook-r.com/Graphs/Plotting_means_and_error_bars_(ggplot2)/

results matching ""

    No results matching ""