[R] Getting the groupmean for each person

Thomas Lumley tlumley at u.washington.edu
Mon May 10 15:59:48 CEST 2004


On Mon, 10 May 2004, Christophe Pallier wrote:
>
> The use of tapply(x,f,mean)[match(f,unique(f))] assumes a particular
> order in the result of tapply, no? It seems a bit dangerous to me.
>

My original code for the group means problem used rowsum(,reorder=FALSE)
rather than tapply(), and we do know that this produces the same order as
unique().

	-thomas




More information about the R-help mailing list