Skip to content
Prev 172212 / 398506 Next

ave and grouping

There was an error in the line below. It should have been the following (i.e.
the ix in extra[ix] was missing):

sleep$newcol <-
   with(sleep, ave(1:nrow(sleep), group, FUN = function(ix)
extra[ix][b[ix][1]]))



On Mon, Mar 2, 2009 at 8:01 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote: