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

Snippets has posted 5883 posts at DZone. View Full User Profile

Scatter Plot With Regression Line

03.16.2010
| 1127 views |
  • submit to reddit
        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)
    
    Tags:
  • r