Re: [Rd] step() in sink() and Sweave()

From: Jari Oksanen <>
Date: Wed, 13 Jun 2007 16:43:32 +0300

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, homepage

______________________________________________ mailing list
Received on Wed 13 Jun 2007 - 14:17:21 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 13 Jun 2007 - 16:34:26 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.