is.na gives unexpected result when used after magrittr pipe %>%
I’m using ==
to compare two character vectors, one of which contains NA
elements. I then want to pipe the logical output of ==
to is.na
using the magrittr
pipe operator %>%
. When I do this directly I get an unexpected result. When I bracket the ==
comparison with (...)
, or save the output of ==
to an object, the piping works. What am I missing about the function of either %>%
or is.na
? Thanks.