I have a dataframe deliv
with the columns date
, name
, region
and count
.
Now I want to want to group by date
and name
so that region
doesn't matter and count
is summed up for every date/name-combination.
My idea was to use dplyr
:
library(dplyr)
df = deliv %>%
group_by(date)
So not even that works; df
is exactly the same as deliv
. I don't know how to debug that piece any further. How do I group by (two) columns but the right way?