Re: [R] summing up colum values for unique IDs when multiple ID's exist in data frame

From: Thomas Lumley <>
Date: Tue, 29 May 2007 14:54:02 -0700 (PDT)

On Tue, 29 May 2007, Seth Falcon wrote:

> "Young Cho" <> writes:
>> I have data.frame's with IDs and multiple columns. B/c some of IDs
>> showed up more than once, I need sum up colum values to creat a new
>> dataframe with unique ids.
>> I hope there are some cheaper ways of doing it... Because the
>> dataframe is huge, it takes almost an hour to do the task. Thanks
>> so much in advance!
> Does this do what you want in a faster way?

rowsum() should probably be faster (but perhaps not much).


Thomas Lumley			Assoc. Professor, Biostatistics	University of Washington, Seattle

______________________________________________ mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 29 May 2007 - 22:03:32 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 29 May 2007 - 23:31:24 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.