View source: R/error_handling.R
try_else | R Documentation |
Try and fail with a default value
try_else(expr, else. = NULL, silent = T)
expr |
(expression) An expression to execute. |
else. |
(any) Value returned on error. |
silent |
(lgl) Whether to silence the error messages. |
The output from the expression or the else value.
try_else(log(1))
try_else(log("abc"))
try_else(log("abc"), silent = F)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.