ABSTRACT

This chapter introduces the design philosophy of rmarkdown, what it can do, and how to customize or extend it. R Markdown v1 is based on the C library sundown, and the major focus is HTML output. Its functionality is very limited, e.g., there is no support for citations or footnotes. R Markdown v2 is based on Pandoc, which has boosted Markdown to a whole new level. The limitation of Markdown can be largely removed by Pandoc, but the problem is that Pandoc is a command-line tool. The goal of rmarkdown and R Markdown v2 is to provide quick conversion of R Markdown files into other document formats, using reasonably beautiful templates. There are seven output format functions in rmarkdown at the moment: PDF, HTML, Word, Markdown, ioslides, Slidy, and Beamer. An important extension in Pandoc's Markdown is the YAML metadata. The most important field in the YAML metadata for rmarkdown is the output field.