try catch finally in r

Published by onesixx on

    tryCatch({
      data.oac.null <- rbind(data.oac.null, data.oac[[j]][[m-i]])
      cat(“sheet”,m-i, “”)
      }, error = function(e){cat(“ERROR :”,conditionMessage(e), “\n”)}

http://mazamascience.com/WorkingWithData/?p=912

result = tryCatch({
    expr
}, warning = function(w) {
    warning-handler-code
}, error = function(e) {
    error-handler-code
}, finally = {
    cleanup-code
}

 

Categories: Programming

onesixx

Blog Owner

Leave a Reply

Your email address will not be published.