I am running a very long simulation, and about 1 in every 20 iterations a model fails to converge which trashes the whole thing.
I know I can use try()
with the offending model to skip past it in the event of an error, but I was wondering if this could be extended into a conditional? By which I mean if an error did occur, it would execute another short script instead of the code that caused the error. Kind of like an if statement for errors.
Thank you all.