In the code below I group_by() the Pop column. How can I modify the code in order not to use Pop but the fist column of the dataset to group_by()
library(janitor)
library(dplyr)
Pop<-c("p","p","p","p","p","p","p","p")
RC<-c("a","b","c","c","d","d","f","f")
MM<-c(10,9,8,27,9,10,23,42)
UT<-c(5,3,6,14,7,9,45,61)
df<-data.frame(Pop,RC,MM,UT)
tor <- df %>% group_by(Pop) %>% group_modify(~ .x %>% adorn_totals()) %>% ungroup
tor <- df %>% group_by(df[,1]) %>% group_modify(~ .x %>% adorn_totals()) %>% ungroup