[R] subsets in data frame
spencer.graves at pdf.com
Wed Jul 14 05:28:20 CEST 2004
The examples there seem to describe what you want. hope this helps.
Laura Holt wrote:
> Hello R People:
> I have a data frame with 2 numeric variables and 1 factor.
> There are 3 levels of the factor.
> I would like to get sums/means/etc of the numeric variables with
> respect to the factor level.
> I tried "table" and "subset" but have not hit upon a solution.
> I thought maybe "apply" would be the answer but can't figure out how
> to break out by factor.
> Any suggestions would be most appreciated.
> Thanks yet again.
> R Version 1.9.1 for windows
> Laura Holt
> mailto: lauraholt_983 at hotmail.com
> your life. http://lifeevents.msn.com
> R-help at stat.math.ethz.ch mailing list
> PLEASE do read the posting guide!
More information about the R-help