diamonds %>% group_by(cut) %>% summarise(TotalPrice = sum(price)) `summarise()` ungrouping output (override with `.groups` argument) # A tibble: 5 x 2