[R] [slightly off topic] Sweave with markdown

baptiste Auguié ba208 at exeter.ac.uk
Fri May 23 10:37:45 CEST 2008


DeaR list,

Has anyone tried to mix the Sweave paradigm with the Markdown[*] (and  
co.) syntax? Would this be hard to implement? My tiny understanding  
of Sweave is that one can define new drivers for the text part, while  
some functions that deal with the R code would not require any  
modification. Here's the reason I'm interested in Mardown for a driver.

I've been orbiting around Sweave for several weeks, and while I  
understand the great value of this "literate programming", I'm a bit  
put off by the technical aspect. I'm a LateX user, and a R user  
(you'd have guessed, albeit fairly novice), so the problem is not to  
get it working (i got some writings done with Sweave), but more of  
getting an efficient workflow. I find the LaTeX commands overly  
intruding in the middle of my R source code, plus the relatively slow  
compilation of latex makes it quite impractical for quick studies ( I  
once spent 20 minutes trying to get the graph to be at a sensible  
scale on the page).

As an alternative, I'm resorting to having a folder per study (I'm  
physicist, doing data analysis for optical spectroscopy), with one R  
file per analysis and a text file to keep track of the experimental  
conditions. When the data is really important / interesting, I've  
also tried to write a package: great for storing the data, functions  
and commands in a consistent manner (this works fine, but it cannot  
be a solution for quick trial experiments. Also, the figures cannot  
be included in the html doc as far as I know.)

I was considering some alternatives to Sweave, namely R2HTML and  
odfWeave, but in the former the source syntax is no less disturbing  
than LaTeX (although the zero compilation time is a plus), while for  
the latter I do not have a decent compatible editor (on a Mac, I  
tried Openoffice and Abiword but the fonts look like my handwriting  
for some obscure reason). Maybe I'll give it another shot at some  
stage, I just usually prefer plain text files.

Any input welcome,

Baptiste

[*]: http://en.wikipedia.org/wiki/Markdown

_____________________________

Baptiste Auguié

Physics Department
University of Exeter
Stocker Road,
Exeter, Devon,
EX4 4QL, UK

Phone: +44 1392 264187

http://newton.ex.ac.uk/research/emag
http://projects.ex.ac.uk/atto



More information about the R-help mailing list