Problem with geom_point and geom_errorbar functions

I am trying to add mean points and error bars to my violin plot. I have managed to create the violin plot however when I type in the geom_point and geom_errorbar functions it says I am missing information with + icons. Can you see any problems with the script I used below?

library(ggplot2)
x<-"None"
y<-1.7
ggplot(five,aes(x=Derivative,y=Score))+geom_violin()+scale_x_discrete(limits=c("None","134","138"))+geom_dotplot(binaxis="y",stackdir="center",dotsize=0.75)+ylim(0,4)+ylab("Score")+xlab("TLR4 Antagonist")+ geom_point(aes(x,y, col="black))+geom_errorbar(aes(x0=x, y0=y-0.3, x1=x, y1=y+0.3, width=0.2, col="black"))

(five)
|Score|Derivative|
|2|None|
|2|None|
|3|None|
|1|None|
|3|134|
|2|134|
|2|134|
|1|134|
|0|138|
|1|138|
|2|138|
|1|138|

Please see the FAQ: What's a reproducible example (`reprex`) and how do I do one? Using a reprex, complete with representative data will attract quicker and more answers.

Even if the answer turns out to be relatively simple, if the problem is difficult because it requires reverse-engineering, it will probably lie undiscovered.

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.