Structure of the book
This book consists of four parts. Part I covers the basics: Chapter 1 introduces how to install the relevant packages, and Chapter 2 is an overview of R Markdown, including the possible output formats, the Markdown syntax, the R code chunk syntax, and how to use other languages in R Markdown.
Part II is the detailed documentation of built-in output formats in the rmarkdown package, including document formats and presentation formats.
Part III lists about ten R Markdown extensions that enable you to build different applications or generate output documents with different styles. Chapter 5 introduces the basics of building flexible dashboards with the R package flexdashboard. Chapter 6 documents the tufte package, which provides a unique document style used by Edward Tufte. Chapter 7 introduces the xaringan package for another highly flexible and customizable HTML5 presentation format based on the JavaScript library remark.js. Chapter 8 documents the revealjs package, which provides yet another appealing HTML5 presentation format based on the JavaScript library reveal.js. Chapter 9 introduces a few output formats created by the R community, such as the prettydoc package, which features lightweight HTML document formats. Chapter 10 teaches you how to build websites using either the blogdown package or rmarkdown’s built-in site generator. Chapter 11 explains the basics of the pkgdown package, which can be used to quickly build documentation websites for R packages. Chapter 12 introduces how to write and publish books with the bookdown package. Chapter 13 is an overview of the rticles package for authoring journal articles. Chapter 14 introduces how to build interactive tutorials with exercises and/or quiz questions.
Part IV covers other topics about R Markdown, and some of them are advanced (in particular, Chapter 16). Chapter 15 introduces how to generate different reports with the same R Markdown source document and different parameters. Chapter 16 teaches developers how to build their own HTML widgets for interactive visualization and applications with JavaScript libraries. Chapter 17 shows how to create custom R Markdown and Pandoc templates so that you can fully customize the appearance and style of your output document. Chapter 18 explains how to create your own output formats if the existing formats do not meet your need. Chapter 19 shows how to combine the Shiny framework with R Markdown, so that your readers can interact with the reports by changing the values of certain input widgets and seeing updated results immediately.
Note that this book is intended to be a guide instead of the comprehensive documentation of all topics related to R Markdown. Some chapters are only overviews, and you may need to consult the full documentation elsewhere (often freely available online). Such examples include Chapters 5, 10, 11, 12, and 14.