Description Usage Arguments Details See Also Examples
Tests if an expression evaluates to an error, if so calls stopwarn otherwise does whatever is given as argument.
1 | ifnerror(expr, noerror, error = "warn", silent = T)
|
expr |
expression to test for error. |
noerror |
expression to be called if no error. |
error |
one of 'warn' or 'stop', passed to stopwarn. |
silent |
logical, if TRUE (default) then error returned silently. |
Tests for an error or nerror (no error) from given expression. If an error is found then either returns NULL with warning or breaks code. If nerror then returns the given expression.
1 2 3 4 5 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.