If you are looking for the data sets, figures and codes mentioned in the books, you can find the necessary files on the relevant authors' webpages.
| Book title | Author webpage | 
|---|---|
| An Introduction to Statistical Learning with Applications in R | https://www.statlearning.com/ | 
| A Modern Approach to Regression with R | https://gattonweb.uky.edu/sheather/book/ | 
