We do not intend to provide a full technical reference for R Markdown in this cookbook. This cookbook aims to supplement, instead of replace, the existing literature. Therefore, readers may explore the following books if they want to seek further information:
Part V (“Communicate”) of R for Data Science (). This part is less technical than the above “Definitive Guide,” and hence may be a gentler introduction to R Markdown.
bookdown: Authoring Books and Technical Documents with R Markdown (Xie 2016) is a short book as the official documentation of the bookdown package (), which is designed to simplify the creation of long-format documents in R Markdown.
Where relevant, this book provides references to these existing resources. By the way, the official R Markdown website also contains a lot of resources that you may find helpful: https://rmarkdown.rstudio.com.
You do not need to read this book in a particular order. Later chapters are not necessarily more challenging than previous chapters. The chapters and sections that we consider to be more advanced than others are marked with an asterisk () in their titles. It may be most efficient to read this book when you have some specific tasks in mind that you want to do with R Markdown, otherwise you can thumb through the table of contents and see if you are interested in any particular parts. We have tried to make each section and example as self-contained as possible, so you do not have to go back and forth among different parts of this book. In some cases, cross-referencing is unavoidable, and we will refer you to the background knowledge required to understand a certain example.
If you want to try the examples by yourself, the full source code of this book and examples are freely provided on GitHub at . If you are reading the electronic version of this book, you may also just copy and paste the examples from the pages and run them in your favorite editor.
Wickham, Hadley, and Garrett Grolemund. 2016. R for Data Science. O’Reilly Media, Inc.
Xie, Yihui. 2015. Dynamic Documents with R and Knitr. 2nd ed. Boca Raton, Florida: Chapman; Hall/CRC. https://yihui.org/knitr/.
———. 2020b. Blogdown: Create Blogs and Websites with r Markdown. .
———. 2020c. Bookdown: Authoring Books and Technical Documents with r Markdown. https://github.com/rstudio/bookdown.
———. 2020d. Knitr: A General-Purpose Package for Dynamic Report Generation in r. .
Xie, Yihui, J. J. Allaire, and Garrett Grolemund. 2018. R Markdown: The Definitive Guide. Boca Raton, Florida: Chapman; Hall/CRC. https://bookdown.org/yihui/rmarkdown.
Xie, Yihui, Alison Presmanes Hill, and Amber Thomas. 2017. Blogdown: Creating Websites with R Markdown. Boca Raton, Florida: Chapman; Hall/CRC. .