[R] sum specific rows in a data frame

arnaud Gaboury arnaud.gaboury at gmail.com
Wed Apr 14 10:57:11 CEST 2010


I have a data frame called "pose":


          DESCRIPTION QUANITY CLOSING.PRICE
1       WHEAT May/10        1        467.75
2       WHEAT May/10        2        467.75
3       WHEAT May/10        1        467.75
4       WHEAT May/10        1        467.75
5 COTTON NO.2 May/10        1         78.13
6 COTTON NO.2 May/10        3         78.13
7 COTTON NO.2 May/10        1         78.13

I would like to sum the quantity for each category (i.e WHEAT and
COTTON),but I have no idea how to write it in a simple manner. The number or
rows will change every day.
TY for any help.



More information about the R-help mailing list