I need to get the row number per group in a grouped data frame. This seems to work as needed:
Some data:
library(dplyr) my_mtcars <- mtcars %>% r