Learn R Programming

assertive (version 0.2-1)

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 sprintf and stored in the "cause" attribute.

Value

  • The get method returns the "cause" attribute.

Examples

Run this code
yn <- is_a_bool(123)
cause(yn)

Run the code above in your browser using DataLab