You use it the way you use any pipe. First operations result passed to next one and so on.
Makes for more readable code instead of nested functions.
To use it you need to install the magrittr package. In addition to get the nice easy to use filter, group_by etc. functions used below you need to install the dplyr package. In fact dplyr depends on magrittr, so install it first and magrittr comes along for the ride.
You'll need the nycflights13 dataset for this example, so do this:
Here is the example which points the finger at airlines with longest delays from NYC:
filter(flights, !is.na(dep_delay)) %>%
%>%summarise(delay = mean(dep_delay))
I really like these functions like the filter one. I find subsetting the 'normal' way in R to be v tricky. This makes is a lot easier - to my mind.
Additional stuff I stumbled upon while looking at and getting the nyc data were these bits: