ifelse()
Cheaper version of ifelse()
cheapr_if_else(condition, true, false, na = false[NA_integer_])
A vector the same length as condition,
using a common type between true
, false
and default
.
logical A condition which will be used to evaluate the if else operation.
Value(s) to replace TRUE
instances.
Value(s) to replace FALSE
instances.
Catch-all value(s) to replace all other instances,
where is.na(condition)
.
case val_match