From jarioksa at sun3.oulu.fi  Wed Jun 13 15:43:32 2007
From: jarioksa at sun3.oulu.fi (Jari Oksanen)
Date: Wed, 13 Jun 2007 16:43:32 +0300
Subject: [Rd] step() in sink() and Sweave()
In-Reply-To: <1181737995.3695.38.camel@gsimpson.geog.ucl.ac.uk>
References: <1178698222.28498.18.camel@biol102145.oulu.fi>
	<1181737995.3695.38.camel@gsimpson.geog.ucl.ac.uk>
Message-ID: <1181742212.26511.12.camel@biol102145.oulu.fi>

On Wed, 2007-06-13 at 13:33 +0100, Gavin Simpson wrote:
> Dear Developers,
> 
> This change also just bit me whilst updating Sweave documents for some
> computer classes.
> 
> Is there a work-around that can be employed so that we get both the
> message() bits and the print() bits in the same place for our Sweave
> files?
> 
> If not, is there any point in filing this as a bug in R? I see there
> have been no (public) responses to Jari's email, yet the change is
> rather annoying, and I do not see the rationale for "printing" different
> parts of the output from step() in two different ways.
> 
I think this is a bug. You should not use message() with optional trace.
The template for the usage in step() is first

if (trace) message()

and later

if (trace) print()

If you specifically request printing setting  trace = TRUE, then you
should not get message().

Interestingly, message() seems to be a warning() that cannot be
suppressed by setting options.

This is so annoying that I haven't updated some of my Sweave documents.
It is better to have outdated documents than crippled documents.

You can handle this in sink(), but I don't know any trick for Sweave
(and it's a nuisance in sink() as well).

cheers, jari oksanen
-- 
Jari Oksanen -- Dept Biology, Univ Oulu, FI-90014 Oulu, Finland
Ph. +358 85531526, cell +358 405136529, fax +358 85531061, skype jhoksane
email jari.oksanen at oulu.fi, homepage http://cc.oulu.fi/~jarioksa/



[Rd] step() in sink() and Sweave()
Jari Oksanen