我需要在该图中添加回归方程和R2。 请帮助我。
x=c(18,23,25,35,65,54,34,56,72,19,23,42,18,39,37)
y=c(202,186,187,180,156,169,174,172,153,199,193,174,198,183,178)
a<-data.frame(cbind(x,y))
library(ggplot2)
ggplot(a,aes(x,y)) +
geom_point(shape=1,size=3) +
geom_smooth(method="lm",se=F,color="red")