[R] plots and text to the same output file

Greg Snow Greg.Snow at imail.org
Wed Feb 11 20:00:37 CET 2009

odfWeave works just fine for me on windows and the XML package shows up in my list of packages.  You may be overthinking the problem, for most of my odfWeave projects I don't need odfInsertPlot, just use fig=TRUE in the code chunk and only include the code for that 1 plot in that code chunk (a separate chunk for each plot) and the inclusion of the plot is taken care of for you (you can do fancier things with odfInsertPlot, but probably don't need to most of the time).

Another alternative for creating postscript (which can be converted to pdf if that is preferred), but which is much less sophisticated than sweave/odfWeave is to look at the etxtStart function in the TeachingDemos package (this requires postprocessing with enscript).  This approach is more for getting a transcript of an interactive session, for planned analyses use sweave/odfWeave instead.

Hope this helps,

Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
Intermountain Healthcare
greg.snow at imail.org

> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of lauramorgana at bluewin.ch
> Sent: Wednesday, February 11, 2009 11:27 AM
> To: r-help at r-project.org
> Subject: [R] plots and text to the same output file
> Hello,
> I would like to save different plots and some text (like summaries,
> AIC, ...) on the same file.
> I've read the e-mails entitled "Output results to a single postscript
> document" written some days ago and I've tried
> to use the function odfInsertPlot() in the package "odfWeave" but it
> doesn't work on my computer (I've seen that
> odfWeave package depends on XML package, which is not available for
> windows...)
> Does somebody know if there is another function or package that could
> help? I would need at least to put all the
> plots on the same file
> ... of course I could copy and paste them by hand but there are tens of
> graphs... :-(
> Thanks!!
> Laura
> ______________________________________________
> 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