How to merge data and calculate multilevel summaries
In one of the lessons in Fundamentals of R, I teach people how to use the group_by() and summarize() functions to calculate simple summaries (e.g. if I have population data on all states, what is the total population of the United States?). But what if you want to group by a