[R] Ignoring Errors in Simulations

Prof Brian Ripley ripley at stats.ox.ac.uk
Wed Nov 5 15:46:26 CET 2003

On Wed, 5 Nov 2003, Ken Kelley wrote:

> I'm doing a simulation study and every so often I get an error that stops 
> the simulation. I would like to ignore the errors *and* identify the 
> particular iterations where they occurred. I have tried:
> options(error = expression(NULL))
> which I thought would ignore the error, but the simulation is still stopped 
> when an error occurs. I do not think try() is a good idea because of the 
> significant computational time (that I think) it would add.

There is no significant extra computational time.  Why do you think there 
would be?  And if there were, why would this be recommended on the help 
page for try?

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

More information about the R-help mailing list