1
我有一個數據集X爲:R:總和在不同級別
customer_id event_type tot_count
931 1 5
231 2 6
231 1 3
333 3 9
444 1 1
931 3 3
333 1 21
444 2 43
我需要在customer_id
和event_type
電平的總和。 這是SQL 1行代碼:
select customer_id, event_type, sum(tot_count) from X group by 1,2
我需要R.
(+1)打我吧 – NPE 2013-03-13 07:29:46