[R] Using Sweave to generate multiple documents

Yihui Xie xie at yihui.name
Tue Jan 17 00:42:03 CET 2012


I do not have a direct solution to your problem, but I think you may
give the knitr package a try (not on CRAN yet but soon will be): it
allows code chunks to be shared across different documents; see
http://yihui.github.com/knitr/demo/externalization/ for what I call
"code externalization". The same chunk can be used in your summary,
full report and slides without being typed repeatedly if you put this
chunk outside of these documents.

Regards,
Yihui
--
Yihui Xie <xieyihui at gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA



On Mon, Jan 16, 2012 at 3:20 PM, Ramiro Barrantes
<ramiro at precisionbioassay.com> wrote:
> Hello,
>
> I tried looking for a Sweave-specific list but didn't find one, nor did I find an answer via google, so will send this question to the general R list.  Please feel free to point me in the right direction.
>
> I am using Sweave and would like to have a single .Rnw document that generates 1) a summary report, 2) a full report, 3) slides for a talk.  I think my material lends itself to have it all coming from one master document because a lot of the plots, writings, and calculations are shared, but I would need Sweave to generate separate files with me somehow pointing to what goes where.  Is this possible with Sweave?
>
> Thanks in advance,
> Ramiro
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> 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.



More information about the R-help mailing list