ifelse()
, but allows you to assign a third value to missings.ifelsena.Rd
Deprecated. Please use dplyr::if_else()
in the future.
Defaults to assigning the "no" value to missing values as well. Often missings encapsulate
some sort of meaning for the variable you're trying to define.
ifelsena(test, yes, no, missing = no)
test | passed to ifelse |
---|---|
yes | passed to ifelse |
no | passed to ifelse |
missing | defaults to the value for no |