- Research demands meticulous experimental design, data processing, data analysis and report preparation.
- Ideally, the procedures can be constructed in a manner that promotes automation, repeatability and transparency.
- The process should be fully integrated within one document with minimal tools required.
- Other researchers should be able to reproduce your work and understand your thought processes.
- Reproducible Research and Literate Programming conceptualize these principles.
GNU Emacs together with Org-mode offers an appealing solution to the problem of reproducible research.
- GNU Emacs is an extensible, customizable, open source text editor that is part of the GNU/Linux distribution.
- Emacs is essentially a shell for an Emacs Lisp interpreter. So virtually any application that requires text editing can be handled by Emacs.
- Emacs offers very fast editing commands within a unified interface.
- Emacs has an extremely large and active development community so advances are made every day. Almost anything you want to do with Emacs is already implemented.
- Emacs features modes that provide computing environments for a multitude of purposes.
- Emacs has hundreds of modes for specialized functionality.
- If you are new to Emacs, I strongly recommend installing Ergoemacs first before becoming accustomed to the keyboard commands. You will be faster and your hands will thank you.
Package/Mode | Purpose |
---|---|
Ergoemacs | Better Keybinding |
AUCTeX | LaTeX environment |
RefTeX | Reference Manager |
AutoComplete | TAB Completion |
Dired+ | File Management |
ESS | Statistical Computing |
IDO | Emacs Buffer Mgmt |
TRAMP | Remote computing |
Org | Organization, RR, LP |
Emacs with Org-mode […] was a game-changer in reproducible research for me.
-John Kitchin, Carnegie Melon University
- Org is a mode for keeping notes, maintaining TODO lists, and doing project planning with a fast and effective plain-text system.
- Org uses simple markup to define its structure and can embed arbitrary markup from LaTeX, HTML, etc.
- Any programming language can be supported with code execution and capturing of output.
- Sophisticated Export dispatcher that allows rich backend export in ascii, Beamer (LaTeX Beamer format), HTML, iCalendar, LaTeX, etc.
myPlot <- qplot(displ, hwy, data=mpg, color=factor(cyl))
myPlot + stat_smooth(method=lm)
- Here R source code is embedded in the Org doc. The code and graphics are displayed using LaTeX (weaved).
- The source code can be extracted to a pure R script (tangled).
- This presentation was generated from an Org doc exported in LaTeX (using Beamer) and processed to a pdf.
- Let’s take a look under the hood… ReproducibleResearch.org