title: Suppress error message in R
body: <p>I am running a simulation study in R. Occassionally, my simulation study produces an error message. As I implemented my simulation study in a function, the simulation stops when this error message occurs. I know that it is bad practice to suppress errors, but at this moment to me there is no other option than to suppress the error and then go on with the next simulation until the total number of simulations I like to run. To do this, I have to suppress the error message R produces.  </p>
  
  <p>To do this, I tried different things: </p>
  
  <pre><code>library(base64)
  suppressWarnings
  suppressMessages
  options(error = expression(NULL))
  </code></pre>
  
  <p>In the first two options, only warnings and message are suprressed, so that's no help. If I understand it correctly, in the last case, all error messages should be avoided. However, that does not help, the function still stops with an error message. </p>
  
  <p>Has someone any idea why this does not work the way I expect it to work? I searched the internet for solutions, but could only find the above mentioned ways. 
  In the function I am running my simulation, a part of the code is analysed by the external program JAGS (Gibbs sampler) and the error message is produced by this analysis. Might this be where it goes wrong? </p>
  
  <p>Note that I do not have to supress a certain/specific error message, as there are no other error messages produced, it is 'good enough' to have an option that supresses just all error messages. </p>
  
  <p>Thanks for your time and help! </p>