Hi i am trying to work how to add standard error bars to my bar plot on r but i can't quite work it out!
This is my bar plot code:ggplot(data=pdiv, aes(x= Area, y = Diversity, fill=Area)) + geom_col() + theme_bw() + xlab("Area") + ylab("Simpson's Diversity Index score") + scale_fill_manual(breaks = c("A", "B", "C", "D"), values = c("indianred1", "mediumorchid3", "lightgreen", "lightblue"))
I've tried calculating means and then doing it manually but that doesn't seem to work.