Skip to content

plots and text to the same output file

4 messages · lauramorgana at bluewin.ch, Greg Snow, Michael Bibo +1 more

#
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
#
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,
#
Greg Snow <Greg.Snow <at> imail.org> writes:
my list of packages.  You may be
odfInsertPlot, just use fig=TRUE
chunk (a separate chunk for each plot)
things with odfInsertPlot, but
if that is preferred), but
etxtStart function in the
approach is more for getting
sweave/odfWeave instead.
See also package hwriter, for creating HTML output files which can be further 
edited, even with MSWord if you work with others in an MSOffice environment.

Michal Bibo
#
lauramorgana at bluewin.ch wrote:
Hi Laura,
Both the R2HTML package and the htmlize and R2html functions in the 
prettyR package enable saving the output of a session in an HTML file 
(with associated image files). The latter two functions are particularly 
easy if you already have a running script and want to get the output in 
an easily viewable format. The advantage of HTML is that it can be 
displayed by "any damn browser".

Jim