Strides towards reproducibility have highlighted the importance of integrating computations and code used in research with the documents that describe and rely on them. However, we still lack formal frameworks, conventions and simple tools for everyday researchers to achieve this.
In 2004, Gentleman & Temple Lang introduced the concept of a research compendium as both a container for the different elements that make up a research paper and its computations (i.e. text, code, data, ...), and as a means for distributing, managing and updating the materials.
For R users, package rrtools (https://github.com/benmarwick/rrtools) provides instructions, templates, and functions for making a basic compendium suitable for writing reproducible research with R. The resulting compendia are based on R package structure, enabling access to powerful developer tools for recording project metadata, developing, checking and testing code, and distributing materials. In this walkthrough I’ll demonstrate producing a research compendium around a reproducible manuscript, by combining code, text and data using rrtools and friends.