Normally ifelse requires 3 arguments (test, yes, no):
ifelse(c(1,2) == 1, T, F)
Providing only a test argument results in an error (because there is no default yes or no field):
ifelse(c(1,2) == 1)
When used in magrittr, ifelse works fine when only receiving a test argument:
c(1:2) %>% ifelse(. == 1)
Can anyone explain why the third chunk of code works fine, but the second results in an error?