Structure of the book
This book consists of four parts. Part I covers the basics: Chapter1 introduces how to install the relevant packages, and Chapter2 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 thermarkdown 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. Chapter5 introduces the basics of building flexible dashboards with the R packageflexdashboard. Chapter6 documents thetufte package, which provides a unique document style used by Edward Tufte. Chapter7 introduces thexaringan package for another highly flexible and customizable HTML5 presentation format based on the JavaScript library remark.js. Chapter8 documents therevealjs package, which provides yet another appealing HTML5 presentation format based on the JavaScript library reveal.js. Chapter9 introduces a few output formats created by the R community, such as theprettydoc package, which features lightweight HTML document formats. Chapter10 teaches you how to build websites using either theblogdown package orrmarkdown’s built-in site generator. Chapter11 explains the basics of thepkgdown package, which can be used to quickly build documentation websites for R packages. Chapter12 introduces how to write and publish books with thebookdown package. Chapter13 is an overview of therticles package for authoring journal articles. Chapter14 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, Chapter16). Chapter15 introduces how to generate different reports with the same R Markdown source document and different parameters. Chapter16 teaches developers how to build their own HTML widgets for interactive visualization and applications with JavaScript libraries. Chapter17 shows how to create custom R Markdown and Pandoc templates so that you can fully customize the appearance and style of your output document. Chapter18 explains how to create your own output formats if the existing formats do not meet your need. Chapter19 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 Chapters5,10,11,12, and14.