rapport (version 1.0)

rapport-package: rapport: an R engine for reproducible template generation

Description

rapport is an R package that facilitates creation of reproducible statistical report templates. Once created, rapport templates can be exported to various external formats: HTML, LaTeX, PDF, ODT, etc.

Arguments

Details

For detailed introductions please check out our homepage: http://rapport-package.info.

You may use the package-bundled templates with a minimal R knowledge - a quick tutorial is shown in the package demo: demo(rapport, ask = FALSE).

Apart from R, all you need to know to start writing your own templates is Pandoc's markup syntax, and several rapport-specific conventions that allow the reproducible of the template. rapport uses brew-like tags to support dynamic inline and/or block evaluation of R code. Unlike many other report-writing conventions in R (Sweave, brew, knitr), rapport converts generated output to a convenient form via pander package and pandoc as the document converting backend. rapport also comes with support for plots: images are automatically saved to temporary file, and image path is returned or redrawn on demand.

The output of rapport command depends on various package-specific options. Please skim through the summary of following options:

  • rapport.user: a (user)name to show in exported report (defaults to "Anonymous")

  • rapport.file.name: a general filename of generated images and exported documents without extension. Some helper pseudo-code would be replaced with handy strings while running rapport and rapport.export:

    • %t: unique random character strings based on tempfile,

    • %T: template name in action,

    • %n: an auto-increment integer based on similar (plot) file names (see: ?evalsOptions),

    • %N: an auto-increment integer based on similar exported document's file name

  • rapport.file.path: a directory where generated images and exported documents would take place.

  • By default rapport function saves plots to image files (see the settings in evalsOptions()) and print method just shows the path(s) of the generated image(s). If you would like to see the plot(s) when calling rapport function from an interactive R console, please set evalsOptions('graph.recordplot') and the global rapport.graph.replay option to TRUE beforehand. In that case all generated plots will be displayed after printing the rapport object. These options are set to FALSE by default although we find these settings really handy, as you can resize the images on the fly and export resized images to HTML/ODT/DOCX/PDF etc. If you would even like to save the actual environment of each generated plot (variables, data sets etc.) as an RData file, please set evalsOptions('graph.env') to TRUE.

  • rapport also has some options to set formatting style of numbers, characters and dates specified in panderOptions()

  • the exported graphs can be customised via further panderOptions

See Also

pander package: http://rapporter.github.com/pander/