From murdoch.duncan at gmail.com  Fri Aug 20 13:10:01 2010
From: murdoch.duncan at gmail.com (Duncan Murdoch)
Date: Fri, 20 Aug 2010 07:10:01 -0400
Subject: [Rd] Sweave  <<*, showWarnings=TRUE>>  ?
In-Reply-To: <19566.23165.213030.881192@lynne.math.ethz.ch>
References: <4C6D80E3.2090806@gmail.com>
	<19566.23165.213030.881192@lynne.math.ethz.ch>
Message-ID: <4C6E6289.1000303@gmail.com>

Martin Maechler wrote:
> Thank you Duncan, for expanding Sweave functionality,
> notably considering error handling.
>
> Related to that is the topic of handling warning messages.
>   

I thought someone (Fritz?  One of the Sweave support package writers?) 
was working on the issue of including error and warning messages in 
Sweave output.  My changes don't address that problem.

The changes I'm going to make will only be visible in syntax errors.  R 
currently has the underlying support to allow it to report source file 
line numbers in execution time error messages, but it isn't taken 
advantage of in many places.  If that is expanded, my Sweave changes 
should take advantage of it automatically.

Duncan Murdoch
> In a course on "using R" (for beginners),
> I would really like to show warnings that code chunks produce.
> Currently, the warnings are printed to the console when I run
>  'R CMD Sweave ..' and do not appear in the resulting *.tex file.
>
> Of course   ---   fortune("Yoda")   ---
> I can always fudge what I want,
> but it would be quite desirable to have simple Sweave option
> which would deal with warnings()  
> { and maybe message(), stop(), and general exception handling; 
>   but for all practical purposes, it's the warnings that I'd
>   like to be handled automatically.}
>
> Martin Maechler, ETH Zurich
>



[Rd] Sweave <<*, showWarnings=TRUE>> ?
Duncan Murdoch