Re: [R] unexpected behaviour with ddply and colwise

2010-04-07 Thread Steve Lianoglou
Last point ... On Wed, Apr 7, 2010 at 6:39 PM, Stuart Andrews wrote: > > Ahhh, I see my error, thanks to Steve and others who mailed me off list. > > Perhaps reading a little too quickly, I mis-interpreted the help for ddply, > in particular, the second argument: > >>       ".variables: variables

Re: [R] unexpected behaviour with ddply and colwise

2010-04-07 Thread Stuart Andrews
Ahhh, I see my error, thanks to Steve and others who mailed me off list. Perhaps reading a little too quickly, I mis-interpreted the help for ddply, in particular, the second argument: >".variables: variables to split data frame by, as quoted variables, a >formula or characte

Re: [R] unexpected behaviour with ddply and colwise

2010-04-07 Thread Steve Lianoglou
Howdy, I'm no plyr master, but here's my 2 cents ... On Wed, Apr 7, 2010 at 5:15 PM, Stuart Andrews wrote: > Hi, > > I am confused by results from: > >> ddply(aa, names(aa), colwise(sum)) > > I thought ddply was just calling colwise(sum)() with each column.   However > ddply() returns a 13 x 5 r

[R] unexpected behaviour with ddply and colwise

2010-04-07 Thread Stuart Andrews
Hi, I am confused by results from: > ddply(aa, names(aa), colwise(sum)) I thought ddply was just calling colwise(sum)() with each column. However ddply() returns a 13 x 5 result !! The general result I expected is similar to that of apply() , or using colwise(sum)() alone. Shouldn