[R] Ignoring Errors in Simulations

Sean O'Riordain seanpor at acm.org
Wed Nov 5 14:42:41 CET 2003


Ken Kelley wrote:
> Hello all.
> 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.
> 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)
> -I am using R 1.7.1 on a Windows XP machine.
> Although increasing the number of starting values attempted would 
> reduces the number or errors, I'm looking for a way that they are 
> ignored and these (likely) untrustworthy results identified.
> Thanks for any thoughts,
> Ken
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://www.stat.math.ethz.ch/mailman/listinfo/r-help

More information about the R-help mailing list