tryCatch with a complicated function and plyr in R
问题 I've got a complicated, long function that I'm using to do simulations. It can generate errors, mostly having to do with random vectors ending up with equal values with zero-variance, getting fed either into PCA's or logistic regressions. I'm executing it on a cluster using doMC and plyr . I don't want to tryCatch every little thing inside of the function, because the possibilities for errors are many and the probabilities of each of them are small. How do I tryCatch each run, rather than