[R] Question about Sweave

From: Elizabeth Purdom <epurdom_at_stanford.edu>
Date: Tue 28 Feb 2006 - 06:34:00 EST


Hi,

I'm not sure if Sweave questions should go to the general list, but it seems to be part of the core R package without a separate maintainer.

I am writing a tutorial for R in a latex file. I'd like to use Sweave, since this seems its ideal usage. The problem is that I want to purposefully put errors in and then the output that comes with it in the text of my tutorial. However the errors kill the function Sweave() in R when what I would like is for Sweave to just run it and include the error message as part of the output.

I have set options(error=NULL). It doesn't seem that the error options would affect Sweave in the right way, since an error in my .Rnw file causes an error in Sweave() itself, not just in the processing of the code, but maybe there's an error-handling system I don't know about that would do it. (I tried error=expression(NULL) but Sweave couldn't finish regardless). I don't see any options in the documentation of Sweave that allow this behavior, either.

Thanks,
Elizabeth



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html Received on Tue Feb 28 06:44:10 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:46 EST