Skip to content
Prev 99845 / 398500 Next

group bunch of lines in a data.frame, an additional requirement

Thanks Gabor, that is much faster than using a loop!

I've got a last question:

Can you think of a fast way of keeping track of the number of
observations collapsed for each entry?

i.e. I'd like to end up with:

A 2.0 400 ID1 3 (3obs in the first matrix)
B 0.7 35 ID2 2 (2obs in the first matrix)
C 5.0 70 ID1 1 (1obs in the first matrix)

Or is it required to use an temporary matrix that is merged later? (As
examplified by Mark in a previous email?)

Thanks a lot for your help,

  Emmanuel
On 9/13/06, Gabor Grothendieck <ggrothendieck at gmail.com> wrote: