stat_summary(fun.y=function(y) { quantile(y)[4] },
geom="point", color="red",size=3) +
stat_summary(fun.y=function(y) { quantile(y)[4] },
geom="line", aes(group=1),size=1,color="black")
Nevertheless I am a bit confused now. Would you please explain me how ggplot applies the fun.y? It seems that the function is applied per group=Occasion rather than the entire data set. However, we do not specify grouping parameter in the stat_summary. I am a bit confused at this point?
One more question, why do we need to specify group=1 in the line?
Thanks.