Sweave/R - Automatically generating an appendix that contains all the model summaries/plots/data pro

Posted by John Horton on Stack Overflow See other posts from Stack Overflow or by John Horton
Published on 2010-04-19T00:58:19Z Indexed on 2010/04/19 1:03 UTC
Read the original article Hit count: 359

Filed under:
|

I like the idea of making research available at multiple levels of detail i.e., abstract for the casually curious, full text for the more interested, and finally the data and code for those working in the same area/trying to reproduce your results. In between the actual text and the data/code level, I'd like to insert another layer. Namely, I'd like to create a kind of automatically generated appendix that contains the full regression output, diagnostic plots, exploratory graphs data profiles etc. from the analysis, regardless of whether those plots/regressions etc. made it into the final paper.

One idea I had was to write a script that would examine the .Rnw file and automatically:

  • Profile all data sets that are loaded (sort of like the Hmisc(?) package)
  • Summarize all regressions - i.e., run summary(model) for all models
  • Present all plots (regardless of whether they made it in the final version)

The idea is to make this kind of a low-effort, push-button sort of thing as opposed to a formal appendix written like the rest of a paper. What I'm looking for is some ideas on how to do this in R in a relatively simple way. My hunch is that there is some way of going through the namespace, figuring out what something is and then dumping into a PDF.

Thoughts? Does something like this already exist?

© Stack Overflow or respective owner

Related posts about r

    Related posts about sweave