[R] Summary (Re: (S|odf)weave : how to intersperse (\LaTeX{}|odf) comments in source code ? Delayed R evaluation ?)
Liviu Andronic
landronimirc at gmail.com
Mon Dec 13 23:06:01 CET 2010
On Mon, Dec 13, 2010 at 12:30 AM, Emmanuel Charpentier
<emm.charpentier at free.fr> wrote:
> Therefore, I let this problem to sleep. However, I Cc this answer (with
> the original question below) to Max Kuhn and Friedrich Leisch, in the
> (faint) hope that this feature, which does not seem to have been missed
> by anybody in 8 years,
>
It has been, at least in a slightly different context. Sweave is not
very flexible when it comes to repetitive tasks: you cannot loop over
mixed R/LaTeX code. One way to work around is to define, in the
Preamble, a \newcommand containing most LaTeX code and calling it in
the R loop via a cat() statement. For a fully worked example see [1].
Unfortunately this is still very inflexible. I guess the "right"
answer to this is either 'brew' or 'markup' (or perhaps some other
packages out there), although I've never fully investigated the two
solutions since the workaround was good enough for my needs.
Regards
Liviu
[1] http://www.mail-archive.com/r-help@r-project.org/msg105487.html
More information about the R-help
mailing list