ABSTRACT

R is all-powerful for the manipulation, visualisation and analysis of data. What is often be under-appreciated is the flexibility with which analyses can be exported or reported.

For instance, a full scientific paper, industry report, or monthly update can be easily written to accommodate a varying underlying dataset, and all tables and plots will be updated automatically.

This idea can be extended to a workflow in which all analyses are performed primarily within a document which doubles as the final report.

Notebooks are documents which combine code and rich text elements, such as headings, paragraphs and links, in one document. They combine analysis and reporting in one human-readable document to provide an intuitive interface between the researcher and their analysis. This is sometimes called “literate programming”, given the resulting logical structure of information can be easily read in the manner a human would read a book.