try_silent {oeli} | R Documentation |
This function tries to execute expr
and returns a string with the
error message if the execution failed.
try_silent(expr)
expr |
An R expression to try. |
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.
## Not run:
try_silent(1 + 1)
try_silent(1 + "1")
## End(Not run)