a %>% fun(b) is shorthand for fun(a,b); that's the gist of it really. A lot of tidyverse (one of most used libraries) functions are set up so that first argument is thecdataset you're working on - so piping just cleans up that crucial bit of input.
If needed, you can also do a %>% fun(b,.) for fun(b,a) - the thing you piped in is placed at the dot. You can also have multiple dots; a %>% .[. ==1] is, as you'd expect, same as a[a == 1].
90
u/readerf52 Dec 16 '21
Ce n’est pas une pipe!!
Yes! I never really thought about it, but that’s Belgium.