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
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
Subject
01/10/2007 17:57 [R] mean of subset of rows
--- [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
4 matches
Mail list logo