[R] Sum according observation

MarcioRibeiro mestat at pop.com.br
Fri Sep 18 17:18:45 CEST 2009


Hi listers,
I have a simple doubt...
I need to manipulate the data base as:

var1 var2
7      0.1
7      0.1
8      0.12
10    0.15
12    0.18
20    0.31

I would like to aggregate the equal cases as var1 making the sum of var2...
I would get...

var1 var2
7      0.2
8      0.12
10    0.15
12    0.18
20    0.31

Thanks in advance,
Marcio
-- 
View this message in context: http://www.nabble.com/Sum-according-observation-tp25510566p25510566.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list