Goals of this lesson:
1) Create scatterplots:
plot() pch() col()
2) Generate correlation:
cor()
2) Generate linear regression result:
lm()
3) Draw a least-squares regression equation on your scatterplot:
abline()
Instructions
- Watch the following video:
- For the details on the “pch” argument, see the link:
http://www.sthda.com/english/wiki/r-plot-pch-symbols-the-different-point-shapes-available-in-r
- Here is a list of colors to choose from for the command col():
http://www.stat.columbia.edu/~tzheng/files/Rcolor.pdf
-END-