Hi I have a dataset that looks approximatively like this
Store shelf Revenue week
3       1     5054   52-2016
3       2     3564   52-2016
3       3     1260   52-2016
15      1     7000   1-2017
15      2     1236   1-2017
15      3     4596   1-2017
My aim is to make sum of revenues by store and week using dplyr
data %>% group_by(store, week) %>% mutate(R_sum = sum(Revenue))
Is this working? Thanks in advance
 
    