DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Scatter Plot With Regression Line
lm (linear Model) shows intercept and slopy.
abline creates a scatter plot and adds a best fit line in it.
abline(lm(p ~ hp), col="red") #where lm(y~x)





