assertive.base (version 0.0-9)

cause: Get or set the "cause" attribute

Description

Gets or sets the "cause" (of failure) attribute of a variable.

Usage

cause(x)

cause(x) <- value

Arguments

x

Any variable.

value

Passed to gettextf and stored in the "cause" attribute.

Value

The get method returns the "cause" attribute.

See Also

set_cause

Examples

Run this code
# NOT RUN {
# Scalar case
yn <- is_identical_to_true(FALSE)
cause(yn)

# Vector case
yn <- is_true(c(TRUE, FALSE, NA))
cause(yn)
# }

Run the code above in your browser using DataCamp Workspace