Frank,

Your template is very interesting.  The "pretty-ifing" of the left arrow and
tilde in the input chunk has the unfortunate side-effect of making the code
non-paste-able into R.

I seem to recall that your reports used to include the latex source code as
an appendix.  Maybe one option could be to include an appendix with the
results of Stangle applied to the .Rnw file, formatted as plain text.  This
would create a concise collection of all the necessary code to reproduce the
results.

Just brainstorming here....

Kevin Wright


On Sun, Jun 14, 2009 at 11:29 PM, Frank E Harrell Jr <
f.harrell@vanderbilt.edu> wrote:

> Dear Group,
>
> I have made significant improvements to our Sweave template, have made the
> template self-contained (i.e., you can run it yourself and it will find the
> datasets it needs), and have included the output pdf file. This is at
> http://biostat.mc.vanderbilt.edu/SweaveTemplate .  You will see in the pdf
> file the enhancements in how R code is pretty-printed, and I have added an
> example where some R function output is suppressed from the listing that
> Sweave typesets.  The new template also suggests how to auto-document the
> computing environment at the end of the report, and how to properly
> reference R and add-on packages.  Figures are centered (but not as nicely as
> Marc Schwartz' approach) and better defaults are used for axis label and
> tick mark label positioning.
>
> Thanks to Romain Francois for providing the trick of suppressing parts of R
> output (replacing it with ...) and Peter Ruckdeschel for his excellent
> SweaveListingUtils package.  Suggestions for further improvements are
> welcomed.
>
> Frank
> --
> Frank E Harrell Jr   Professor and Chair           School of Medicine
>                     Department of Biostatistics   Vanderbilt University
>
> ______________________________________________
> R-help@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.
>

	[[alternative HTML version deleted]]


