r – Could not find function %<>% with dplyr loaded
r – Could not find function %<>% with dplyr loaded
%<>%
isn’t exported by dplyr (only %>%
is). You need to load magrittr instead.
Your reproducible example is running into a subtle magrittr bug, which causes the evaluation of pipeline expressions to search for some operators in magrittr’s scope, rather than in the calling scope. That way, x %<>% y %>% z
, which evaluates as `%>%`(x %<>% y, z)
, finds and evaluates magrittr’s `%<>%`
operator.