From friedrich.leisch at stat.uni-muenchen.de  Wed Jun 13 16:31:44 2007
From: friedrich.leisch at stat.uni-muenchen.de (Friedrich Leisch)
Date: Wed, 13 Jun 2007 16:31:44 +0200
Subject: [Rd] step() in sink() and Sweave()
In-Reply-To: <1181742212.26511.12.camel@biol102145.oulu.fi>
References: <1178698222.28498.18.camel@biol102145.oulu.fi>
	<1181737995.3695.38.camel@gsimpson.geog.ucl.ac.uk>
	<1181742212.26511.12.camel@biol102145.oulu.fi>
Message-ID: <18031.65488.381819.113410@celebrian.ci.tuwien.ac.at>

>>>>> On Wed, 13 Jun 2007 16:43:32 +0300,
>>>>> Jari Oksanen (JO) wrote:

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


The topic is on the agenda, but no released code yet. Hadley Wickham
has code collecting all output, messages, warning etc that arise when
an expression is evaluated which can be used in various places like
sink or Sweave to solve this problem. We have already scheduled
discussions for a workshop which we both attend in 3 weeks.

Sorry for not replying to the original email.

Best,
Fritz

-- 
-----------------------------------------------------------------------
Prof. Dr. Friedrich Leisch 

Institut f?r Statistik                          Tel: (+49 89) 2180 3165
Ludwig-Maximilians-Universit?t                  Fax: (+49 89) 2180 5308
Ludwigstra?e 33
D-80539 M?nchen                 http://www.stat.uni-muenchen.de/~leisch



[Rd] step() in sink() and Sweave()
Friedrich Leisch