Skip to content
Back to formatted view

Raw Message

Message-ID: <NGBBKLJCOLPAFMJIEMHCOEAHCDAA.cdeclercq@nordnet.fr>
Date: 2002-11-05T17:39:57Z
From: Christophe Declercq
Subject: Sweave - documenting a long function
In-Reply-To: <20021105065506.7bb06887.fharrell@virginia.edu>

> 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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._