powered by
is.error(x)
try
tryCatch
simple
logical(1)
x <- try(stop("foo")) print(is.error(x)) x <- 1 print(is.error(x))
Run the code above in your browser using DataLab