Re: [R] How to delete rows based on replicate values in one column with some extra calcuation

From: Nikhil Kaza <>
Date: Mon, 28 Jun 2010 22:58:37 -0400

aggregate(data$third, by=list(data$first), sum)


cast(melt(data), ~first, sum)

On Jun 28, 2010, at 9:30 PM, Yi wrote:

> first=c('u','b','e','k','j','c','u','f','c','e')
> second
> =
> c
> ('usa
> ','Brazil
> ','England','Korea','Japan','China','usa','France','China','England')
> third=1:10
> data=data.frame(first,second,third) mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 29 Jun 2010 - 03:15:40 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 Wed 30 Jun 2010 - 02:30:42 GMT.

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

list of date sections of archive