Chapter 1:

Chapter 2:

For each Example, the PDF file shows the code and the correspoding R output. The raw R code is found in the R Code link as a text file. You can either copy and paste the content of this file directly into the R console or open and view it with an editor such as R Studio.