[R] adding labels to tapply results
Greg.Snow at imail.org
Mon Sep 29 19:31:46 CEST 2008
Try using aggregate instead of tapply. If that does not answer your question, then try restating it or showing what your desired output would look like (see the posting guide referenced at the bottom of every post).
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
> project.org] On Behalf Of eric lee
> Sent: Monday, September 29, 2008 6:46 AM
> To: r-help at r-project.org
> Subject: [R] adding labels to tapply results
> How do I get labels onto the output from tapply? I need the labels to
> the output with another data frame. Thanks.
> d <- data.frame(cbind(x=1:3, y=1:10))
> a <- with(d, tapply(y, x, sum))
> [[alternative HTML version deleted]]
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help