28. Rich Documents with RMarkdown

RMarkdown has quickly become the preferred means of communicating results from R, eclipsing LaTeX due to RMarkdown’s simplicity to write and that it compiles to many different formats, including HTML, PDF, Microsoft Word, slideshows and Shiny apps. The RMarkdown format is extendable and templated, enabling customized documents. The workflow for writing RMarkdown is similar to that for LaTeX as detailed in Chapter 27: Normal text (flavored with Markdown) is written and R code is put in chunks. The style of the chunk delineation is different, but the idea is the same. The files are typically saved as .Rmd files.

28.1 Document Compilation

RMarkdown depends on knitr for evaluating R code and pandoc for converting ...

Get R for Everyone: Advanced Analytics and Graphics, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.