bash | R Documentation |
Equivalent to tryCatch()
.
bash(expr, e = NULL, w = NULL)
expr |
Expression to run, passed to |
e, w |
An object of class |
safe_log <- function(x){
result <- bash(log(x))
if(is.e(result))
stop(result$stop())
return(result)
}
if(interactive())
safe_log("a")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.