Displaying 1 result from an estimated 1 matches for "mglogg".
Did you mean:
logg
2004 May 08
3
Getting the groupmean for each person
Hello list !
I have a huge data.frame with several variables observed on about 3000
persons. For every person (row) there is variable called GROUP which indices
the group the person belongs to. There is also another variable AV for each
person. Now i want to create a new variable which holds the group mean of AV
as a value for each person.
With tapply(AV,GROUP,mean) i get the means for each