[R] grouping data together

jim holtman jholtman at gmail.com
Sun Nov 9 23:18:40 CET 2008


If your grouping is a list, then you can use 'sapply'; e.g.,

sapply(yourRanking, function(x) sum(x$rank))  # or whatever you want the sum of.

On Sun, Nov 9, 2008 at 4:00 PM, Swanton0822 <iverson0822 at hotmail.com> wrote:
>
> Hi,
> i have group all the data, but now if i would want to sum all the rank in
> each group, how can i do it?
> ie. i want to sum the rank in every group, not total. so there will be a sum
> of rank for month Jan,Feb,.....Dec, therefore there will be total of 12
> vaule of ranking sum.
> many thanks,
> --
> View this message in context: http://www.nabble.com/grouping-data-together-tp20389726p20410781.html
> Sent from the R help mailing list archive at Nabble.com.
>
> ______________________________________________
> 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.
>



-- 
Jim Holtman
Cincinnati, OH
+1 513 646 9390

What is the problem that you are trying to solve?



More information about the R-help mailing list