[R] Fast method to compute average values of duplicated IDs

From: Daren Tan <daren76_at_hotmail.com>
Date: Tue, 10 Jun 2008 15:37:12 +0000

Hi,  

How do I collapse (average in the simplest case) the values of those duplicated ids (i.e., 2, 5, 6, 9) to give a table of unique ids ?  

t <- cbind(id=c(1:10, 2,5,6,9), value=rnorm(14))      


        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Tue 10 Jun 2008 - 17:37:36 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Tue 10 Jun 2008 - 18:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive