asadoughi / stat-learning

Notes and exercise attempts for "An Introduction to Statistical Learning"
http://asadoughi.github.io/stat-learning
2.12k stars 1.62k forks source link

Sub-Section 3.6.2 Simple Linear regression page 112, missing $ in code #71

Closed duttashi closed 7 years ago

duttashi commented 7 years ago

In chapter 3, Sub-Section 3.6.2 Simple Linear regression on page 112, there is a paragraph that states, to quote,

we will now plot medv and lstat along with the least squares regression line using the plot() and albline () functions. plot(lstat, medv)

This code returns an error Error in plot(lstat, medv) : object 'lstat' not found there is a missing $ in the code plot(lstat, medv) The correct code syntax should be > plot(Boston$lstat, Boston$medv)

duttashi commented 7 years ago

Ohh, I see this is not the ISLR book official github page. Closing the issue as it is not related.