set_cause {assertive.base} | R Documentation |
Sets the cause attribute of an object and returns that object.
set_cause(x, false_value, missing_value = "missing")
x |
A variable. |
false_value |
A character vector to set the cause to, where |
missing_value |
A character vector to set the cause to, where |
If x
is TRUE
everywhere, this returns the input
without setting a cause. Otherwise, the cause is an empty string where
x
is TRUE
, false_value
where it is FALSE
, and
missing_value
where it is NA
.
x
, with a new cause attribute.