I am making a grouped bar graph using ggplot2. However, I am having trouble adding sd/sem. The standard errors are: '1,2,3,1'. How can I add Error Bar to this bar graph?
survey <- data.frame(group=rep(c("LG", "RM"),each=2),
sample=rep(c("sample1", "sample2"),1),
values=c(200,50,300,25 ))
library(ggplot2)
ggplot(survey, aes(x=sample, y=values, fill=group)) +
geom_bar(stat="identity", position=position_dodge())