[R] Sweave - documenting a long function

Christophe Declercq cdeclercq at nordnet.fr
Tue Nov 5 18:39:57 CET 2002


> De : owner-r-help at stat.math.ethz.ch
> [mailto:owner-r-help at stat.math.ethz.ch]De la part de Frank E Harrell Jr
> Envoyé : mardi 5 novembre 2002 11:55
> À : John.Gavin at ubsw.com
> Cc : r-help at stat.math.ethz.ch
> Objet : Re: [R] Sweave - documenting a long function

[...]

> It may work better to implement variations of 'pretty printing' for Sweave
so
> that you can use different fonts, etc., from within one code chunk by
using S
> comments.  When I'm not using Sweave, I do this with a Perl parser that
does
> things such as changing <- to a left arrow and changing # ... text ... to
> \scom{... text ...}.  I define \scom in LaTeX to use a smaller Times-Roman
> font that for on-screen viewing is blue.  See
> http://biostat.virginia.edu/latex for details.  Perhaps Friedrich Leisch
will
> consider allowing the user to specify a customized Perl script or S
function
> that translates S code for pretty printing (including specifying prompt
> characters other than R>).

Specifying prompt is already possible (from R 1.6.0).
See http://www.ci.tuwien.ac.at/~leisch/Sweave/Sweave-manual-20021007.pdf:

"As of R version 1.6.0 the driver gets the prompts used for input lines and
continuation lines from
R’s options() settings. To set new prompts use somthing like

options(prompt="MyR> ", continue="...")"

Christophe
--
Christophe DECLERCQ, MD
Observatoire Régional de la Santé Nord-Pas-de-Calais
13, rue Faidherbe 59046 LILLE Cedex FRANCE
Phone +33 3 20 15 49 24
Fax   +33 3 20 55 92 30
E-mail c.declercq at orsnpdc.org


-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list