Learn R Programming

assertive (version 0.2-6)

assert_is_environment: Is the input an environment?

Description

Checks to see if the input is an environment.

Usage

assert_is_environment(x)

is_environment(x, .xname = get_name_in_parent(x))

Arguments

x
Input to check.
.xname
Not intended to be used directly.

Value

  • is_environment wraps is.environment, providing more information on failure. assert_is_environment returns nothing but throws an error if is_environment returns FALSE.

See Also

is.environment.

Examples

Run this code
assert_is_environment(new.env())
assert_is_environment(globalenv())
assert_is_environment(baseenv())

Run the code above in your browser using DataLab