purely | R Documentation |
Capture all errors, warnings and messages
purely(.f)
.f |
A function to decorate |
A function which returns a list. The first element of the list, $result, is the result of the original function .f applied to its inputs. The second element, $log is NULL in case everything goes well. In case of error/warning/message, $result is NA and and $log holds the message. purely() is used by loudly() to allow the latter to handle errors.
purely(log)(10) purely(log)(-10)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.