[R] how to calculate summary statistics for each factor

Erik Iverson eriki at ccbr.umn.edu
Tue Jul 6 19:29:49 CEST 2010


?tapply is one way.

karena wrote:
> I have a dataset like the following:
> 
> subject   class     value
> 123        1            10
> 124        1             12
> 125        1            12
> 223        2            23
> 224       2             18
> 225         2            19
> 323        3             21
> 324       3              10
> 325       3               19
> 326       3               20
> 
> how to calculate the summary value for each factor?
> thanks
> 
> karena



More information about the R-help mailing list