Learn R Programming

BBmisc (version 1.2-200)

is.error: Is return value of try an exception?

Description

A simple wrapper for is(x, "try-error").

Usage

is.error(x)

Arguments

x
[any] Return value of a try-statement.

Value

  • [logical(1)].

Examples

Run this code
x <- try(stop("foo"))
print(is.error(x))
x <- 1
print(is.error(x))

Run the code above in your browser using DataLab