Skip to contents

Sets the cause attribute of an object and returns that object.

Usage

setCause(object, ...)

# S4 method for goalie
setCause(object, ...)

# S4 method for logical
setCause(object, false)

Arguments

object

Object.

...

Additional arguments.

false

character. A character vector to set the cause to, when x is FALSE.

Value

goalie.

Note

Updated 2023-10-02.

See also

Examples

x <- setCause(
    object = c(TRUE, TRUE, FALSE, FALSE),
    false = "false"
)
print(x)
#> [1]  TRUE  TRUE FALSE FALSE
print(cause(x))
#> [1] NA      NA      "false" "false"