catch | R Documentation |
Catches results, warnings and errors.
catch(expr)
expr |
expression to be evaluated, typically a function call. |
This function is particularly useful for large(r) simulation studies to not fail until finished.
list
with components:
value |
value of |
warning |
warning message (see |
error |
error message (see |
Marius Hofert (based on doCallWE()
and tryCatch.W.E()
in
the R package simsalapar).
catch(log(2))
catch(log(-1))
catch(log("a"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.