[R] How to delete rows based on replicate values in one column with some extra calcuation
Nikhil Kaza
nikhil.list at gmail.com
Tue Jun 29 04:58:37 CEST 2010
aggregate(data$third, by=list(data$first), sum)
or
reqiure(reshape)
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)
More information about the R-help
mailing list