try_silent | R Documentation |
This function tries to execute expr
and returns a string with the
error message if the execution failed.
try_silent(expr)
expr |
[ |
This function is a wrapper for try
.
Either the value of expr
or in case of a failure an object of class
fail
, which contains the error message.
Other function helpers:
do.call_timed()
,
function_arguments()
,
function_body()
,
function_defaults()
,
quiet()
,
timed()
,
variable_name()
## Not run:
try_silent(1 + 1)
try_silent(1 + "1")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.