Re: [R] error options

2011-12-28 Thread Bert Gunter
Below. -- Bert On Wed, Dec 28, 2011 at 11:35 AM, Paul Murtaugh wrote: > Hi, > > I'm running simulations that include a function that occasionally fails > because of an unpredictable singularity in a matrix that it tries to invert. > I'd like to have the function return 'NA' when that happens, so

[R] error options

2011-12-28 Thread Paul Murtaugh
Hi, I'm running simulations that include a function that occasionally fails because of an unpredictable singularity in a matrix that it tries to invert. I'd like to have the function return 'NA' when that happens, so that the simulations can continue. I've tried things like: test <- function