I am trying to use a function to add standard deviation error bars to my ggplot bar graph. In particular, I want to use mean_sdl.
ggplot(recall_info) +
aes(x = Condition, y = pwords) +
geom_bar(aes(Condition, pwords), position = "dodge", stat = "summary", fun.y = "mean") +
stat_summary(fun.data = mean_sdl, width=0.05, geom = "errorbar") +
labs(y = "% of words remembered", title = "Proportion of Words Remembered") +
theme_light() + coord_cartesian(ylim=c(0,50)) +
geom_signif(comparisons = list(c("condition1", "condition2")), test = "t.test", map_signif_level=TRUE)
And I get the following error:
No summary function supplied, defaulting to
mean_se()Warning message: Ignoring unknown parameters: fun.y
I don't understand what is wrong. The error bars I get on my graph are clearly wrong - they go off the graph entirely.
Thanks in advance.