The dplyr
package introduced the %.%
operator to pass the left hand side as an argument of the function on the right hand side, similar to a *NIX pipe. The magrittr
package is a much more lightweight package that exists to define only that pipe-like operator.
Yet one uses %.%
and the other %>%
.
Is there any difference between the two? Can I just use %>%
even in dplyr
code, or will that cause subtle bugs?
On inspecting the code, they take very different paths early on, so simple eyeball comparison would suggest that they're different. I haven't been able to find anything documented when I search the web for them, nor have I run across anything in the documentation itself.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…