I'd like to summarize several variables in a data frame, for multiple groups, 
and store the results in a data.frame. To do so, I'm using by(). For example:

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)

The result has a class of "by" and a mode of "list". I'm new to R and can't 
find any documentation on this class, and don't see methods for it associated 
with the as.data.frame.  How should I go about coercing this to a data frame?  
Is there a comprehensive source that I'm might be missing, which can tell me 
such things?

Cheers
                                          
        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to