Chapter 9 Dynamic Report

Literate programming is proposed by Knuth (1984) that both source code and documentation in the same program file.

Dynamic document is an implementation of literate programming that allows the combination of

  1. writing the programming code and
  2. writing to explain the result.

There are two ways to create in RStudio.

  1. Sweave: based on LaTeX

  2. Knitr: based on pandoc

Learning objective

  • Write dynamic document using sweave

  • Write dynamic document using knitr