if else
A wrapper around if() else()
to prevent unexpected interactions between ifelse()
and factor variables
ife(x, a, b)
x
: True / Falsea
: value to return if Trueb
: value to return if FalseBy default ifelse()
will convert factor variables to their numeric values which is often undesirable. This connivance function avoids that problem
Useful links