This is a bit more "think about it" question - but I see it as an important one to ask.
I have been struggling for the past few days with having a more reproducible-research-like workflow. I am confused with the two different strategies for writing a report.
The two strategies are:
- Sweave or brew. Where there is a report.Rnw or report.brew file that has a mixture of some markup language (either HTML or LaTeX) and R code between special braces (say <<>>= @). This file needs to be run through Sweave or brew in order to create the report file (report.html or report.tex).
- R2HTML (for HTML) and Hmisc (for LaTeX). Where the .r file uses R functions to construct report.html or report.tex; running the R commands generates the report directly.
What is clear to me is that most people online seem to be using option 1. But I do not understand why it is so common, when option 2 seems to me (without too much experimenting) to be less work.
When is each of the two strategies better?
Any ideas/feedback/thoughts would be welcome, Thanks.