Shouldn't the size of the output in if_else() come from condition alone - rather than the common size of all inputs? That seems like the most predictable behavior, and is what dplyr::if_else() does. This PR updates if_else() so that size only comes from condition
This also updates the code style to use _common() functions and avoid two calls to is.na()
Shouldn't the size of the output in
if_else()
come fromcondition
alone - rather than the common size of all inputs? That seems like the most predictable behavior, and is whatdplyr::if_else()
does. This PR updatesif_else()
so that size only comes fromcondition
This also updates the code style to use
_common()
functions and avoid two calls tois.na()