There are some very good resources available to further study exception handling. Here are some web links for further investigation on this topic: http://adv-r.had.co.nz/Exceptions-Debugging.html https://www.r-bloggers.com/error-handling-in-r/ http://mazamascience.com/WorkingWithData/?p=912