[R] Aggregating data
Sarah Goslee
sarah.goslee at gmail.com
Fri Aug 5 19:02:53 CEST 2011
split() might be useful.
On Fri, Aug 5, 2011 at 12:55 PM, Jeffrey Joh <johjeffrey at hotmail.com> wrote:
>
>
> I aggregated my data: aggresults <-aggregate(results, by=list(results$a, results$b, results$c), FUN=mean, na.rm=TRUE)
>
>
>
> results has about 8000 lines of data, and aggresults has about 80 lines. I would like to create a separate variable for each of the 80 aggregates, each containing the 100 lines that were aggregated. I would also like to create plots for each of those 80 datasets.
>
>
>
> Is there a way of automating this, so that I don't have to do each of the 80 aggregates individually?
>
>
--
Sarah Goslee
http://www.functionaldiversity.org
More information about the R-help
mailing list