Skip to content
Prev 345511 / 398502 Next

Working with data-frame

Christopher:

If I understand correctly, see ?ave, or ?tapply, depending on what
form you want to be returned.

The trick is to first paste the columns together on whose unique you
want to split to form a singtl factor. e.g. of the form

lapply(split(yourcolumn,paste0(...)),FUN= sum)

However, the above functions already have this "built" in, so you
don't need to do this explicitly, although my impression is that it
may be a tad more efficient to do it the long way. But don't quote me
on this!

Cheers,
Bert

Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374

"Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom."
Clifford Stoll




On Sun, Nov 9, 2014 at 11:58 AM, Christofer Bogaso
<bogaso.christofer at gmail.com> wrote: