Trying to summarize a data set, but it does not group the variables specified
Sample from the data set, test2
newClientID Month newApp count app
100 November R 51 Other
100 November Tableau 58 Other
100 October R 12 Other
100 October Tableau 212 Other
100 September R 72 Other
100 September Tableau 74 Other
100 October SQL Assistant 11 Other
100 September SQL Assistant 396 Other
This should summarize the data
test3 <- test2 %>%
group_by(newClientID, Month, app) %>%
summarise(total = sum(count))
It should be like this
newClientID Month app total
100 November Other 109
100 October Other 235
100 September Other 542
But I am getting
newClientID Month app total
100 November Other 109
100 October Other 224
100 September Other 146
100 October Other 11
100 September Other 396
Why is it nor grouping the Month variable?