Re: [R] mean of subset of rows

2007-10-02 Thread darteta001
Thankyou all for your answers, I have decided using aggregate() but I will keep in mind tapply(). I was wondering if it is possible to tell aggregate to use two functions at the same time, i.e., mean() and sd (), or is it better to call aggregate() two times, one for mean, and another for sd

[R] mean of subset of rows

2007-10-01 Thread darteta001
Dear list, this must be an easy one: I have a data.frame of two columns, ID with four different levels (A to D) and numerical size, and each of the 4 different IDs is repeated a different number of times. I would like to get the mean size for each ID as another data.frame. I have tried the

Re: [R] mean of subset of rows

2007-10-01 Thread joris . dewolf
Subject 01/10/2007 17:57 [R] mean of subset of rows

Re: [R] mean of subset of rows

2007-10-01 Thread John Kane
--- [EMAIL PROTECTED] wrote: Dear list, this must be an easy one: I have a data.frame of two columns, ID with four different levels (A to D) and numerical size, and each of the 4 different IDs is repeated a different number of times. I would like to get the mean size for each ID