I'm new to R and I'm trying to plot a grouped bar plot with se bars, but without any success.
responses_plot <- ggplot(hu_sum2, aes(y=N,x=Answer_Type,fill=Group)) + labs(y='Number of Answers') + geom_bar(stat ="identity", position = "dodge") + facet_wrap("Condition") + theme_bw() + theme(axis.text.x = element_text(angle = 70, hjust = 1)) + xlab("Type of Answer")+ scale_fill_brewer(palette = "Pastel1") responses_plot
I tried adding to my plot this:
+ stat_summary(geom = "bar", fun.y = mean, position = "dodge") + stat_summary(geom = "errorbar", fun.data = mean_se, position = "dodge")
This is my subset on which I am plotting the data:
Thank you to anyone who could help!