[R] how do I calculate means or cov matrix for multivariate groups

mirauta bmirauta at yahoo.com
Mon Feb 22 10:13:19 CET 2010


Hello,

Having the matrix d
> d
   value value2 class
1      1      1     x
2      2      2     x
3      3      3     x
4      4      2     x
5      5      1     y
6     11      3     y
7     12      4     z
8     13      5     z
9     14      6     z
10    15      7     z

I want to calculate the means and cov matrix for groups x,y,z.
I know how to do it the long way.
I tried to use tapply and kmeans but no good results.
(tapply is a good solution for only 1 variable)


Thank you

Bogdan


-- 
View this message in context: http://n4.nabble.com/how-do-I-calculate-means-or-cov-matrix-for-multivariate-groups-tp1564157p1564157.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list