I'm new to R, and would like to add standard error bars to my bar-graph. I have the following code:
p1 <- ggplot(plot1, aes(x=factor(drink_type), y=value, fill = manipulation)) +
stat_summary(fun.y="mean", geom="bar", position="dodge") +
theme_classic() +
labs(x = 'Drink type', y = 'Evidence accumulation')
p1 + stat_summary(fun.data = mean_cl_normal, geom = "errorbar", width = .08, position = position_dodge(0.9))
However, I'm not sure whether this 'geom = "errorbar" produces the standard error bars (which is what I am after). This is the data I am working from. I wonder if I need to create a new column that is the SE of the 'value' column in order to present the standard error bars?
ppt | manipulation | drink_type | value
1 | n | avg_alcohol_drift | 1.8854094
1 | p | avg_alcohol_drift | 1.6257274
1 | n | avg_softdrink_drift | 1.8519074
1 | p | avg_softdrink_drift | 1.8477995
Any help would be really appreciated!

