[Rd] R CMD build fails with try(stop()) in vignette

Luke Tierney luke at stat.uiowa.edu
Thu Apr 12 14:35:28 CEST 2007

On Thu, 12 Apr 2007, Friedrich Leisch wrote:

>>>>>> On Wed, 11 Apr 2007 17:28:31 -0500 (CDT),
>>>>>> Luke Tierney (LT) wrote:
>  > It would appear that printing the error message to stderr() is what is
>  > causing the build to fail; replace
>  >  	try(stop('err'))
>  > with
>  >  	cat('Error in try(stop("err")) : err\n', file = stderr())
>  > and I get the same failure.
> Yes, both R CMD check and R CMD build "analyse" the textual output
> from running R (on examples, vigenttes, ...) to locate
> problems. Reason is a chicken&egg problem: You cannot use the same R
> process which runs the code to spot all problems, because it may not
> survive until the point where you are able to spot the problem.
> Having errors thrown in code chunks is still in many ways an open
> problem in Sweave files, because it is hard to distinguish problems
> the user wants to show to the reader from ones that are not deliberate
> ...

Just to clarify: this means for now the recommendation would be for
authors of vignettes using try() to arrange to suppress the error
message either by adding silent=TRUE to the call or setting the
show.error.messages option to FALSE?



> Best,
> Fritz

Luke Tierney
Chair, Statistics and Actuarial Science
Ralph E. Wareham Professor of Mathematical Sciences
University of Iowa                  Phone:             319-335-3386
Department of Statistics and        Fax:               319-335-3017
    Actuarial Science
241 Schaeffer Hall                  email:      luke at stat.uiowa.edu
Iowa City, IA 52242                 WWW:  http://www.stat.uiowa.edu

More information about the R-devel mailing list