reshape does transpose by default, in addition to grouping