Re: [R] [slightly off topic] Sweave with markdown

From: baptiste Auguié <ba208_at_exeter.ac.uk>
Date: Sat, 24 May 2008 14:00:06 +0100

Thank you all, I think I have a good list of options now.

The best suited to my personal taste seems to be the Brew package, which I completely overlooked until I looked at the source examples. If I can persuade my text editor (textmate) to recognize the markup and also execute the R chunks, I'll have my dream workflow: a single text file with both text (in a lightweight, email friendly markup), and the R commands together. The MultiMarkdown extension allows me to convert the brewed file into whatever output one could wish for: LaTeX, Html, pdf, rtf,... I'll probably be using the html conversion for routine work, and the LaTeX one when a clean printed version is needed. The use of dev.copy or some similar command should make easy the creation of both bitmap and vector versions of the graphs if needed.

Thanks again everyone!

baptiste

On 23 May 2008, at 13:30, Gabor Grothendieck wrote:

> You could check out the brew package:
>
> https://stat.ethz.ch/pipermail/r-packages/2007/000327.html
>
> On Fri, May 23, 2008 at 4:37 AM, baptiste Auguié
> <ba208_at_exeter.ac.uk> wrote:
>> 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
>>
>> ______________________________________________
>> R-help_at_r-project.org mailing list
>> https://stat.ethz.ch/mailman/listinfo/r-help
>> PLEASE do read the posting guide http://www.R-project.org/posting-
>> guide.html
>> and provide commented, minimal, self-contained, reproducible code.
>>


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



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 24 May 2008 - 13:12:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 24 May 2008 - 15:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive