First, I did try to follow the link below (along with a bunch of other google efforts...):
Grouped barplot in R with error bars
My dataset is quite small (and R still greatly confuses me being new to any sort of programming). My spatial data looks something like this with fake data:
Site1 <- c(1, 2, 3, NA, 3, 4, 8, 1, 4)
Site2 <- c(2, 4, 8, 8, 2, NA, 1, 2, 5)
Site3 <- c(5, NA, 4, NA, 8, 1, 3, 4 ,6)
my.data <- cbind(Site1, Site2, Site3)
my.data <- cbind(Site1, Site2, Site3)
my.data <- data.frame(a = c("during", "during", "during", "during", "after", "after", "after", "after", "after"), my.data)
colnames(my.data) <- c("time", "GA", "GI", "DI")
I want to create a grouped barplot of the means of each site with error bars representing 1 standard deviation, where "during" and "after" are grouped by site (GA, GI, DI). I tried to do this by creating a data frame of means and plotting those. Which works great. Except I can't figure out how to add the error bars. I would appreciate any help. I know this is an elementary question but I am in baby steps when it comes to coding. So yeah.