Answers for "group all variables into one group in R"

1

how to group by 2 variables in r

library(dplyr)

tab %>%
  group_by(month, variable) %>%
  summarise(a_sum=sum(amount),
            a_mean=(mean(amount)))
Posted by: Guest on April-26-2021

Code answers related to "group all variables into one group in R"

Browse Popular Code Answers by Language