ABSTRACT

The design of the knitr package is flexible enough to process any plain text documents in theory. Below are the three key components of the design:

1. a source parser

2. a code evaluator

3. an output renderer

The parser parses the source document and identifies computer code chunks as well as inline code from the document; the evaluator executes the code and returns results; the renderer formats the results from computing in an appropriate format, which will finally be combined with the original documentation.