Add ons for orgmode


Add ons for orgmode

The other files here:
a markdown (and easily viewed) version of
description and definition of backends to create Sweave, brew, Rmd, and html-knitr style files. This file is too big to generate a blob, so either
  • click on the raw button if you see an error message when trying to view it and save the text
  • download and view it in emacs orgmode
  • or git clone the repository and view the file (using emacs orgmode for the best viewing)
older version for pre-February 2013 merge of new exporter to the orgmode master
includes an orgmode translation of example-1 from the Sweave user’s manual. Exporting with e-latex-noweb produces a file very similar to the *.Rnw code.
this sets up to allow parallel exports using e-latex and two derived backends e-latex-noweb and e-latex-brew and inspect the diffs between them.
includes an orgmode translation of knitr-minimal.Rhtml from the the knitr demos page


  • The new exporter and Babel are moving targets.
  • There are my own misunderstandings and mistakes.

So bugs happen. Please let me know if you encounter a bug or if something seems to break that once worked as that might indicate a change in the exporter or Babel that I need to keep up with.

The example *.org files should always work!

Why Bother ?


Orgmode is for keeping notes, maintaining TODO lists, doing project planning, and authoring with a fast and effective plain-text system. The same org document can be used to create LaTeX, HTML, plain ASCII, and various other formats upon export.

Babel is Org-mode’s ability to execute source code within Org-mode documents. It is powerful and flexible and a useful tool for generating reproducible research reports as outlined in the report : Eric Schulte, Dan Davison, Thomas Dye, and Carsten Dominik. A Multi-Language Computing Environment for Literate Programming and Reproducible Research. Journal of Statistical Software. 46(3) Jan 2012. Source code blocks can be editted in place or in a language major-mode edit buffer containing the body of the code block. And for R blocks, ESS is fully functional.

R document/report Generators

There are many markup and report and document generating packages and functions for R. A useful overview of them is at CRAN Task View for Reproducible Research

Several to which this software is aimed are

  • Sweave
  • brew
  • knitr

Putting orgmode and Sweave together

Each approach (orgmode as report generator vs Sweave-like report generators) has its own strengths and weaknesses.

orgmode makes it really easy to track things and to build code incrementally.

Sweave has several dependency aware caching systems in R that are simple and powerful. Also, there are some nice formatting tools available and more coming into use. And many of them are hard (or maybe impossible) to use when Babel is doing the final report generation. There are terrific possibilities presented by R packages like =knitr= and =pander=.

A new export engine

The new orgmode export engine (see Org Export Reference Documentation) offers the possibility to have a workstyle in which an orgmode master document contains a subtree with text and code blocks that when exported becomes an Sweave or brew style document that when run produces LaTeX, HTML, and/or some other markup language. By including caching options in those documents the development process becomes easy to organize, restarting work after a break is just a matter of rerunning the document to load the cached objects and libraries, then switching to the orgmode master to try out some new code, reorganize the presentation, and so on.