Re: [R] plyr workaround to converting by() to a data frame

2011-04-07 Thread rmailbox
ect.org Help" Date: Thu, 7 Apr 2011 18:39:30 +0200 Subject: [R] plyr workaround to converting by() to a data frame Dear all Is there a clean plyr version of the following by() and do.call(rbind, ...) construct: > df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y")

[R] plyr workaround to converting by() to a data frame

2011-04-07 Thread Liviu Andronic
Dear all Is there a clean plyr version of the following by() and do.call(rbind, ...) construct: > df<-data.frame(a=1:10,b=11:20,c=21:30,grp1=c("x","y"),grp2=c("x","y"),grp3=c("x","y")) > dfsum<-by(df[c("a","b","c")], df[c("grp1","grp2","grp3")], range) > as.data.frame(dfsum) Error in as.data.frame.