R for Data Science chapter 3 and the transform section.
Reshaping Data Lab
dplyr cheatsheet
dplyr website