title: Breaking loop when "warnings()" appear in R
body: <p>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.  </p>
  
  <p>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?!</p>