If speed is a concern and you're working in R, you should use data.table instead of dplyr. In Hadley Wickham's words: "We optimise dplyr for expressiveness on medium data; feel free to use data.table for raw speed on bigger data.". Although personally I don't think data.table is any less expressive.