Skip to content

Latest commit

 

History

History
202 lines (156 loc) · 7.21 KB

reproducibleResearchTalk.org

File metadata and controls

202 lines (156 loc) · 7.21 KB

Reproducible Research through GNU Emacs Org-mode

1 Reproducible Research and Literate Programming

1.1 Necessity of Reproducible Research and Literate Programming

  • 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.

1.2 Reproducible Research Schematic

literateProgrammingChart.png

1.3 Available Tools

compareToolsTable.png

2 GNU Emacs

2.1 Emacs Org-mode: A Solution to Reproducible Research

GNU Emacs together with Org-mode offers an appealing solution to the problem of reproducible research.

2.2 GNU Emacs

  • 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.

2.3 Emacs Modes

  • 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/ModePurpose
ErgoemacsBetter Keybinding
AUCTeXLaTeX environment
RefTeXReference Manager
AutoCompleteTAB Completion
Dired+File Management
ESSStatistical Computing
IDOEmacs Buffer Mgmt
TRAMPRemote computing
OrgOrganization, RR, LP

3 Org-mode

3.1 Org-mode

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.

4 Demonstration

4.1 Working with R Source Code

   
myPlot <- qplot(displ, hwy, data=mpg, color=factor(cyl))
myPlot + stat_smooth(method=lm)
  

piecewiseLinear.png

  • 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).

4.2 Example Org Doc

  • 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

5 Theory/Reality of Automation

5.1 Theory/Reality of Automation from xkcd.com

automationCartoon.png