[R] Calculate mean/var by ID
Adam D. I. Kramer
adik-rhelp at ilovebacon.org
Thu Sep 11 20:04:00 CEST 2008
On Thu, 11 Sep 2008, liujb wrote:
> I have a data set that looks like this.
> ID value
> 111 5
> 111 6
> 111 2
> 178 7
> 178 3
> 138 3
> 138 8
> 138 7
> 138 6
> I'd like to calculate the mean and var for each object identified by the ID.
> I can in theory just loop through the whole thing..., but is there a easier
> way/command which let me calculate the mean/var by ID?
> View this message in context: http://www.nabble.com/Calculate-mean-var-by-ID-tp19440461p19440461.html
> Sent from the R help mailing list archive at Nabble.com.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help