Closed
Labels
Milestone
Description
(I've comment in #3740 (comment). After a second though, I think it's better to open a new issue ticker but feel free to close it if it regards as duplicated)
Just tried the new fifelse(), fantastic!
However, I like the choice that dplyr::if_else() made - has an additional argument named missing.
It's because in R, the logic scalar may have three different values, TRUE, FALSE and NA.
Currently, fifelse() returns NA for test NA, I think it very good. But it may be better if we can have a function with an additional argument na like this:
fifelse(test, yes, no, na)Is it a good idea?
Reacted by Michael Chirico, raneameya and Matt Dowle
Activity
jangorecki commentedon Aug 9, 2019
I think it is good idea, and shouldn't add any overhead. Maybe only for double requires extra check for NaN.
2005m commentedon Aug 9, 2019
Yes I can suggest something and NaN are dealt with. Shall I do a pull request or shall I wait for @jangorecki PR #3740 first?
jangorecki commentedon Aug 9, 2019
Generally it would be fine to push it to the same PR branch so we can deal with conflicts easily, but I feel we might need to revert some of my chances there, so probably better to wait for @mattdowle to review #3741 first.
2005m commentedon Aug 31, 2019
Hello, just saw that #3741 has been reviewed. Where would you like me to commit changes for feature request #3753 ? Thanks.