R: dplyr – group_by dynamic or programmatic field

See the original posting on DZone Python

In my last blog post I showed how to group timestamp based data by week, month and quarter and by the end we had the following code samples using dplyr and zoo:
Preview Text: 

In my last blog post I showed how to group timestamp based data by week, month and quarter. I wanted to pull this code out into a function. It turns out if we want to do this…