Interactive Documents with R

Basic Framework

Gentleman and Lang published a very interesting paper in 2004 that presented a software framework for authoring integrated dynamic documents which are reproducible. The basic idea presented in their paper is to think of a document as a compendium that consists of text, data, code and auxilliary libraries that can then be transformed into arbitrary output views in different formats.

They define a compendium as

as both a container for the different elements that make up the document and its computations (i.e. text, code, data, . . .), and as a means for distributing, managing and updating the collection.



  1. A dynamic document is an ordered composition of code chunks and text chunks that describe and discuss a problem and its solution.
  2. A compendium is a collection of dynamic documents integrated with code and auxilliary libraries.
  3. A transformer is a system or mechanism that transforms a compendium into an appropriate output view.