[R] how to make partial mean() of a matrix only when second value matching some logic

madr madrazel at interia.pl
Wed Dec 8 16:54:53 CET 2010


for example I have matrix with two columns

x,y
1,0.56
2,9.55
2,7.56
5,2.55
5,0.56
3,0.55
2,0.56
2,1.56

so I need to take average from y values placed where x==2
-- 
View this message in context: http://r.789695.n4.nabble.com/how-to-make-partial-mean-of-a-matrix-only-when-second-value-matching-some-logic-tp3078449p3078449.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list