[R] Truncated R output in Sweave
Frank E Harrell Jr
f.harrell at vanderbilt.edu
Sat Jun 6 19:06:29 CEST 2009
Dear Colleagues:
In producing a book or a handout I sometimes cut out a large part of the
printed output of an R function, substituting ... for that chunk.
Deleting non-essential output saves paper. It would be nice to have a
capability in Sweave to allow the user to specify a starting and an
ending regular expression that would identify consecutive lines of
output to replace with ..., without showing the extra code required to
do this to the user. I would want the LaTeX output, other than the
omission, to appear the same as if the section were not omitted. Does
anyone have an idea of how to do this elegantly?
By the way I just discovered the SweaveListingUtils package by Peter
Ruckdeschel (on CRAN), which produces beautifully printed R code in
Sweave code chunks. I put some info about it at
http://biostat.mc.vanderbilt.edu/SweaveTemplate which has our Sweave
template for statistical reports.
Thanks
Frank
--
Frank E Harrell Jr Professor and Chair School of Medicine
Department of Biostatistics Vanderbilt University
More information about the R-help
mailing list