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-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, -- Vie

Re: [R] grouping data together

2008-11-08 Thread John Kane
A very simple but long way to do this would be to subset your data set. There are better ways but this way would be easy to understand. January <- subset(mydata, Month=="January") Repeat for each month. --- On Fri, 11/7/08, Swanton0822 <[EMAIL PROTECTED]> wrote: > From: Swanton0822 <[EMAIL PR

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 t

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, Swanton082

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 hav