Re: [R] how to calculate the mean of a group in a table

2011-05-10 Thread tornanddesperate
Just wanted to thank everybody here for their great help. I tried the "tapply" and it worked brilliantly. By changing its parameters I can easily compute the values for the other treatments as well. Without help, I probably would just have despaired. Have a great time mat -- View this message in

Re: [R] how to calculate the mean of a group in a table

2011-05-08 Thread John Kane
I see you already have three solutions but, just for the heck of it, here's another. I am trying to get familiar with the reshape2 package and your question was a good exercise for me. With your data set named xx: library(reshape2) yy <- melt(xx, id=c("period", "treatment", "session", "

Re: [R] how to calculate the mean of a group in a table

2011-05-07 Thread David Winsemius
On May 7, 2011, at 2:24 PM, tornanddesperate wrote: Hi its me again I don't mean to get on your nerves, but the use of R proofs to be a bit more complicated than envisaged. I would like to calculate the mean of a group of values, here "wage_accepted". The group is determined by the stage a

Re: [R] how to calculate the mean of a group in a table

2011-05-07 Thread Pete Brecknock
tornanddesperate wrote: > > Hi its me again > > I don't mean to get on your nerves, but the use of R proofs to be a bit > more complicated than envisaged. > > I would like to calculate the mean of a group of values, here > "wage_accepted". The group is determined by the stage and period, so in