[R] Help summarizing R data frame
Ivan Calandra
ivan.calandra at uni-hamburg.de
Thu Dec 2 17:33:48 CET 2010
see ?aggregate, and ?summaryBy (in package doBy)
I think ddply (in package plyr) could also do the job
Ivan
Le 12/2/2010 17:24, chris99 a écrit :
> I am trying to aggregate data in column 2 to identifiers in col 1
>
> eg..
>
> take this>
>
> identifier quantity
> 1 10
> 1 20
> 2 30
> 1 15
> 2 10
> 3 20
>
> and make this>
>
> identifier quantity
> 1 45
> 2 40
> 3 20
>
>
> Thanks in advance for your help!
--
Ivan CALANDRA
PhD Student
University of Hamburg
Biozentrum Grindel und Zoologisches Museum
Abt. Säugetiere
Martin-Luther-King-Platz 3
D-20146 Hamburg, GERMANY
+49(0)40 42838 6231
ivan.calandra at uni-hamburg.de
**********
http://www.for771.uni-bonn.de
http://webapp5.rrz.uni-hamburg.de/mammals/eng/1525_8_1.php
More information about the R-help
mailing list