Learn R Programming

erratum (version 2.2.0)

checks: Check

Description

Check whether an object is an error or a warning.

Usage

is.e(obj)

# S3 method for default is.e(obj)

# S3 method for err is.e(obj)

is.w(obj)

# S3 method for default is.w(obj)

# S3 method for err is.w(obj)

is.problem(obj)

Arguments

obj

Object to check.

Value

A boolean value.

Functions

  • is.e: Whether the object is an error.

  • is.w: Whether the object is a warning.

  • is.problem: Whether the object is an error or a warning.

Examples

Run this code
# NOT RUN {
err <- e("Whoops!")

is.e(err)
is.w(err)

# }

Run the code above in your browser using DataLab