[R] help
    Kenneth Frost 
    kfrost at wisc.edu
       
    Fri Jul 22 16:56:34 CEST 2011
    
    
  
Hi, Kim-
For starters you might have a look at
?by
?tapply
?aggregate
Ken
On 07/22/11, kimberly sels   wrote:
> Hi,
> 
> I need to calculate the average length of a trait per individual. I am not
> used to working with R so I could use some help.
> The table goes like this:
> 
> ind    trait
> 1       3.6
> 1       3.8
> 1       3.9
> 1       3.6
> 2       5.5
> 2       5.2
> 3       4.8
> 3       4.5
> 
> and so on...
> 
> If I type mean(trait) it will give me the average of all the individuals and
> I need a list of averages per individual.
> Can you help me please?
> 
> Kim
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.
    
    
More information about the R-help
mailing list