Hi Andrew,

Thank you very much! It works so well than I can expect.

All the best,
Wei-Wei

2006/6/30, Andrew Robinson <[EMAIL PROTECTED]>:
> Hi Wei-Wei,
>
> try this:
>
> eva.agg <- aggregate(x = list(
>                        VC1=eva$VC1,
>                        EO1=eva$EO1,
>                        EO2=eva$EO2,
>                        EO3=eva$EO3,
>                        EO4=eva$EO4,
>                        EO5=eva$EO5
>                        ),
>                      by = list(PARTNO=eva$PARTNO),
>                      FUN = mean, na.rm = TRUE)
>
> eva.agg$NUM <- aggregate(eva$PARTNO, list(eva$PARTNO), length)
>
> Cheers
>
> Andrew
>

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to