CRAN Task View: Reproducible Research
|Contact:||max.kuhn at pfizer.com|
The goal of reproducible research is to tie specific instructions to data analysis
and experimental data so that scholarship can be recreated, better understood and
R largely facilitates reproducible research using literate programming; a document
that is a combination of content and data analysis code. The
function (in the
base R utils package) can be used to blend the subject matter and R code
so that a single document defines the content and the algorithms.
Basic packages can be structured into the following groups:
packages contain functions to write R objects into LaTeX
also includes methods for
translating strings to proper LaTeX markup (e.g., ">=" to
"$\geq$"). Animations can be inserted into LaTeX documents
being converted to PDF via the
function in the base grDevices package is a
PicTeX graphics driver.
has drivers that allow
to process HTML documents via
can be used to build HTML pages sequentially.
can also convert some
R objects into HTML representations.
also has facilities to weave
R code with HTML as well as convert markdown to HTML.
Open Document Format
Word processing tools, such as OpenOffice.org, can then be used to blend content and programs.
Many word processors can be used to translate the ODF document to other formats
(e.g., Word, PDF, HTML, etc.)
packages for Windows
can be used to communicate between R and Word or PowerPoint via
the COM interface. Document elements (e.g. sections, text,
images, etc) that are created in R can be inserted into the
document from R. The
can also be used to create
RTF format documents directly from R. Commercial R products
that work with RTF and/or Word are
Inference for R
.The output from other
R2HTML) can also
be opened by Word.
can integrate code with
Plain Text Formats
R code and output in
files can be converted into
and other structured
text formats using the
packages have tools for
package can also provide enhanced control over how
R code chunks and their output are rendered in LaTeX.
Caching of R Objects
packages allow caching of specific
code chunks. The
packages can also be used but are
not integrated with
package (for shared reproducibility package management) creates
an R package that organize the results of an
document into different
directories (e.g., article, figures, etc).
packages contain alternative approaches
to embedding R code into various markups.
is a comprehensive package
that includes code formatting, highlighting,
caching, fine control of graphics, conditional evaluation, multiple
markup formats and other features. The
package can write R
and also to convert those or complex reports to PDF/HTML/docx/ODT. The
package builds on
and provides a way to create
reproducible statistical report templates with graphs, tables and annotations to
be applied to any R data frame and export the results in different formats.
An incomplete list of packages which facilitate literate programming for specific
types of analysis or objects:
The base R utils package has generic functions to convert objects to
toLatex) and BibTeX (via
Functions for creating LaTeX representations of summary statistics and visualizations
can be found in the
also has functions for marking up data frames and the
packages can mark up matrices.
Cross-tabulations can be converted to LaTeX code using the
packages provide LaTeX
representations of some common models (e.g., Cox proportional hazards model, etc.).
For example, processing an
object with the
function will generate LaTeX markup of the ANOVA table. Similarly, methods exist
and other types of objects.
contains LaTeX markup functions for quantile regression
Standardized exams can be created using the
ODF and LaTeX functions, respectively, for survey sampling objects