Skip to content
Prev 353244 / 398498 Next

dplyr help

?dplyr solution:

bevs %>% group_by(name, sex, drink) %>% summarise(?cost = sum(cost)) %>%
select(name, drink, cost, sex)

The last select statement puts the output in the column order you wanted in
your result.

I hope this helps.

Brian
On Wed, Jul 29, 2015 at 9:37 PM, Jon BR <jonsleepy at gmail.com> wrote: