powered by
This function tries to execute expr and returns a string with the error message if the execution failed.
expr
try_silent(expr)
Either the value of expr or in case of a failure an object of class fail, which contains the error message.
fail
[expression] An R expression to be evaluated.
expression
This function is a wrapper for try.
try
Other function helpers: do.call_timed(), function_arguments(), function_body(), function_defaults(), quiet(), timed(), variable_name()
do.call_timed()
function_arguments()
function_body()
function_defaults()
quiet()
timed()
variable_name()
if (FALSE) { try_silent(1 + 1) try_silent(1 + "1") }
Run the code above in your browser using DataLab