Guest User

Untitled

a guest
Feb 18th, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. ID month country count style
  2. 1 2012-02 UK 3 high
  3. 1 2012-02 US 10 high
  4. 1 2012-02 FR 5 high
  5. etc
  6.  
  7. aggregated_data = setDT(subset)[, .(Country = list(Country), ID = min(ID),
  8. count = sum(count), by = list(Model, Month)][]
  9.  
  10. ID month country count
  11. 1 2012-02 UK, US, FR 18
  12. etc
Add Comment
Please, Sign In to add comment