[R] group means: split and unsplit
Peter Dalgaard
p.dalgaard at biostat.ku.dk
Sat Jun 25 10:01:56 CEST 2005
"Liaw, Andy" <andy_liaw at merck.com> writes:
> I didn't quite understand what you were looking for, but you may want to
> check out ave()...
...which is implemented as split-lapply-unsplit (OK, "split<-").
> Andy
>
> > From: Thomas Davidoff
> >
> > Took me a while but I figured out how to put in common values of
> > group means/counts, etc. to do the same thing as egen. lapply with
> > split and then unsplit.
--
O__ ---- Peter Dalgaard Øster Farimagsgade 5, Entr.B
c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K
(*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
More information about the R-help
mailing list