I am using the data.table package to speed up some summary statistic collection on a data set.
I'm curious if there's a way to group by more than one column. My data looks like this:
Date Value
2016-12-11 36
2016-12-11 40
2016-12-12 17
2016-12-12 41
2016-12-12 27
...
2017-2-21 22
2017-2-21 53
2017-2-21 19
2017-2-21 20
2017-2-21 32
Can I get the data like this:
Date Value
2016-12-11 c(36, 40)
2016-12-12 c(17, 27, 41)
2016-2-21 c(19, 20, 22, 32, 53)
Attention:
Each date row number is not equal. That make me go crazy.