It would serve us well to point out some of these principles before we get to using dplyr--this will help us contrast these tidy tools with data.table’s approach and add context to the types of manipulations that we’ll be seeing shortly. There is one main principle, in particular, that I believe underlies a lot of the other doctrines of the manifesto: the call to embrace functional programming.
Functional programming is a hot topic in computer science research. There’s a whole lot to know about this programming paradigm, and any attempt to distill it down to a paragraph explanation (which we are about to do) will be an oversimplification. But, mainly, this paradigm strongly advocates for the use of functions as routines that (a) do not modify their arguments, (b) do not modify anything, and (c) whose behavior...