In this repository, I store some of the codes I have written through my study of the book "An Introduction to Statistical Learning". They include labs and solution to exercises.
The easiest way to view the labs or solutions is to preview the PDF files associated with each chapter, which are stored in "results/pdf". However, they are best viewed as HTML-formatted files, which could be found in "results/html". HTML formatting allows for additional features (such as a floating table of contents which facilitates file navigation, or use of tabs which helps with visual comparison of similar results). The drawback is that, unlike PDF, these HTML files cannot be previewed in GitHub. Nonetheless, they could be viewed after downloading the files and corresponding folders, i.e. the content of "results/html".
A more comprehensive overview of different formats can be seen below:
-
PDF documents They can be found in "results/pdf". The PDF documents contain the codes, results and explanation. In GitHub, scrolling through the PDF files might be slow. To scroll faster, the files could be downloaded. Alternatively, one may scroll through the Rmarkdown Notebook files (described below) on GitHub, with the drawback that they exclude the rendered codes.
-
Rmarkdown Notebook files, with the extension *.Rmd:
They can be found in the "src" folder. Each notebook includes the code and corresponding explanation. This file should be downloaded and rendered within RStudio to create different output formats, such as HTML or PDF. After rendering, one can see the code and results in the same document.- Github may not show the Rmarkdown syntax properly, for example when there are Latex codes. For proper formatting, the file should be viewed in RStudio.
-
The HTML document resulted from rendering the Rmarkdown Notebook:
They can be found in "results/html". Each HTML document includes the codes, explanation and results. Previews are typically not available in Github (due to the large size of files) and if available, they are not rendered (i.e. only the source HTML code would be previewed). To access the files, one should download the HTML files and their corresponding folders. -
The NB.HTML document resulted from rendering the Rmarkdown Notebook:
They can be found in "results/nb.html". Each file is a self-contained HTML file, which could be viewed in a browser after downloading. The GitHub preview only shows the source HTML code.