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

Friedrich Leisch friedrich.leisch at stat.uni-muenchen.de
Wed Jun 13 16:31:44 CEST 2007


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



More information about the R-devel mailing list