This works, but it doesn't get you a comma, because a comma confuses the formula parser.
library(ggplot2)
set.seed(123)
n <- 100
data <- data.frame(x=(40+10*rnorm(n)),y=-0.2+0.5*rnorm(n))
ggplot(data)+
geom_point( aes(x,y),shape=1,size=4)+
stat_smooth(method="lm",size=0.6,se=FALSE,colour="black")+
annotate("text",x=c(30,37),y=c(0.45,0.43),label=c("italic(r^{2}==0.151)","p==0.226"),
parse=TRUE) +
theme_bw(base_size = 12)
Here is the graph.

Note your error is coming about because you are giving it a vector of length 2 in your annotate
command, but the x
and y
parameter only have length of 1. I adjusted them, but it would be better as one line I think.
To get the comma you can break it up into two annotate
layers like thi:
library(ggplot2)
set.seed(123)
n <- 100
data <- data.frame(x=(40+10*rnorm(n)),y=-0.2+0.5*rnorm(n))
ggplot(data)+
geom_point( aes(x,y),shape=1,size=4)+
stat_smooth(method="lm",size=0.6,se=FALSE,colour="black")+
annotate("text",x=30,y=0.45,label="italic(r^{2}==0.151)", parse=T) +
annotate("text",x=36,y=0.43,label=", p==0.226",parse=F) +
theme_bw(base_size = 12)
Yielding this:

But I personally think it is too much bother. Go without the comma. Although there might be a way to get it in the formula with an escape sequence or something.