Re: [R] grouping data together

2008-11-09 Thread Swanton0822
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, --

Re: [R] grouping data together

2008-11-09 Thread jim holtman
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 [EMAIL PROTECTED] wrote: Hi, i have group all the data, but now if i would want to sum all the rank in

Re: [R] grouping data together

2008-11-08 Thread Swanton0822
. http://www.nabble.com/file/p20392420/kew.dat kew.dat Hi, i did something wrong, with the data attach all i want is 12 groups for the months like this:(group 1=group Jan,..group12= group Dec) group 1 group 2 group 3.. group 12 and inside each group is the vaule of

Re: [R] grouping data together

2008-11-08 Thread John Kane
PROTECTED] Subject: [R] grouping data together To: r-help@r-project.org Received: Friday, November 7, 2008, 6:03 PM Hi. i have a data, and there is 3 columns, Month, Year and Total. and there is over 1000 rows for them because there is 87 years data for every month, so there is month from Jan-Dec

[R] grouping data together

2008-11-07 Thread Swanton0822
Hi. i have a data, and there is 3 columns, Month, Year and Total. and there is over 1000 rows for them because there is 87 years data for every month, so there is month from Jan-Dec, and year from 1900-1987, so i was wondering if i would want to make 12 groups (Jan,Feb...,Dec), and put each

Re: [R] grouping data together

2008-11-07 Thread cruz
hi friend, this is from your previous posts on Kruskal-Wallis test:) i came up with this one: A5 - read.table('kew.dat' ,header=TRUE) plot(factor(A5$Month, levels=month.abb), A5$Rain) is that what you want? On Sat, Nov 8, 2008 at 7:03 AM, Swanton0822 [EMAIL PROTECTED] wrote: Hi. i have a

Re: [R] grouping data together

2008-11-07 Thread jim holtman
If you provide the input and the expected output, it would help a lot. You could use 'split' to partition the data monthly - split(yourDF, yourDF$month) but I am still not sure exactly what you want to do with it, or the format that you are expecting. On Fri, Nov 7, 2008 at 6:03 PM,