I have created a graph with the follow code:
ggplot(data.frame, aes(x=Score, y=Year, col=Position)) +
geom_smooth(method="lm", se=FALSE)
.
The plot is shown below. I'd like to add Pearson r values and P-values if possible to the accompanying label table or a new table on the graph? Adding the P-values is more important than the Pearson r's. Can anyone help me with this?
A sample of the data for reproducibility:
Year Position Score
2010 QB 16.5
2011 QB 15.4
2012 QB 16.1
2013 QB 14.3
2014 QB 13.8
2010 RB 14.2
2011 RB 13.9
2012 RB 13.9
2013 RB 11.8
2014 RB 11.6
2010 WR 11.4
2011 WR 12.4
2012 WR 10.4
2013 WR 8.8
2014 WR 9.7