[R] Ignoring Errors in Simulations

Ken Kelley KKelley at nd.edu
Tue Nov 4 22:38:01 CET 2003

Hello all.

I'm doing a large scale 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.

Specifically I am using factanal() from the mva library and the error is:

Error in factanal(Data, factors = 1, rotation = "none") :
         Unable to optimize from these starting value(s)

Although I increasing the number of starting values attempted would 
(presumably) help reduce the number or errors, I'm looking for a way that 
they are ignored and these (likely) untrustworthy results identified.

Thanks for any thoughts,

More information about the R-help mailing list