I've got a lot of code written in dplyr 0.4.3, that relied on the grouped arrange() function. As of the 0.5 release, arrange no longer applies grouping. 

This decision baffles me, as this makes arrange() inconsistent with other dplyr verbs, and surely a user could just ungroup() before arrange() if ungrouped is required. I would have hoped for perhaps a parameter in arrange() to retain grouped\_by behavior, but alas!

I therefore have to rewrite my grouped arrange. At this point, my only option seems to be to break up the pipe at the arrange call, loop through the groups and arrange group by group, and then bind() the result again. I'm hoping there might be a more elegant solution?

Below is an MRE, I'd like to run a cumsum on wt per group\_by(cyl). Many thanks for ideas/suggestions.

```
library(dplyr)

mtcars %>% 
  group_by(cyl) %>% 
  arrange(desc(mpg)) %>%
  mutate(WtCum = cumsum(wt))

```