http://www.markhneedham.com/blog... R: dplyr - Group by field dynamically (‘regroup’ is deprecated) | Mark Needham