Hello,
 
I have a dataframe which I read from a file:
 
df <- readtable(myFile);
 
The dataframe has 4 columns: "model", "count", "value" and "date" where
"model" and "date" are made of charactors and "count" and "value" are
numbers. An example is like:
model    count    value    date
A            4            20.8    7/1/2005
A            3            10.2    7/2/2005
B            7            14.2    7/1/2005
B            1            6.2      7/2/2005
A            2            11        7/1/2005
B            9            65.2     7/2/2005
 
Now I want to get the total count and value for each model/date pair,
like
model    count    value    date
A            6        31.8        7/1/2005
A            3            10.2    7/2/2005
B            7            14.2    7/1/2005
B            10            67.4      7/2/2005
 
Anyone can tell me how to do this?
 
Thanks.
 
Fan

        [[alternative HTML version deleted]]

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to