I have a dataframe that looks like the following. In the real dataset, there are 14 dv's and 9 conditions.
dv condition mean sd
dv1 1 4 1
dv1 2 5 1
dv1 3 3 2
dv2 1 3 1
dv2 2 6 2
dv2 3 4 1
I know I can graph these separately in the following way. I can create a separate dataframe for each dv and then graph it.
dv1 <- df[1:3,]
dv1_graph <- ggplot(dv1, aes(x=condition, y = mean, fill = condition)) +
geom_bar(stat = "identity", color = "black", position = position_dodge()) +
labs(title = "DV1") +
geom_errorbar(aes(ymin = mean-sd, ymax = mean+sd), width = 0.2, position = position_dodge(.9))
Is there a way to create a separate bar graph with error bars for each dv simultaneously?