I am having an issue:
I am running a loop to process multiple files. My matrices are enormous and therefore I often run out of memory if I am not careful.
Is there a way to break out of a loop if any warnings are created? It just keeps running the loop and reports that it failed much later… annoying. Any ideas oh wise stackoverflow-ers?!
You can turn warnings into errors with:
Unlike warnings, errors will interrupt the loop. Nicely, R will also report to you that these particular errors were converted from warnings.