Skip to content
Prev 306235 / 398506 Next

Mean calculation of groups

Hello,

Or ?tapply.
ave will return a vector with the length of the input, tapply just one 
value per group.


ave(test$Score, test$Name, FUN = mean)  # 24 values
tapply(test$Score, test$Name, FUN = mean)  # 3 values

Hope this helps,

Rui Barradas

Em 25-09-2012 15:54, Bert Gunter escreveu: