In R I have the following dataframe:
Group mean sd
1 1 21.2 5.202563
2 2 28.4 6.113737
3 3 21.8 2.529822
I would like to create a barplot with the means and the standard deviations as arrows on top of the means like this example:
This is the code I have so far:
barCenters <- barplot(height = Ymeans12stdev$mean,main = "Average Time per Group",
xlab = "Group", ylab = "Time")
However, I am not succeeding in adding the standard deviation bars. Can anyone solve this ? :)
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…