Hi,

I have the following (M x N) matrix, where M = 10 and N =2
What I intend to do is to group index of (M) based on this condition
of "x_mn" , namely

For each M,
If x_m1 > x_m2, assign index of M to Group1
otherwise assign index of M into Group 2


> x
               [,1]       [,2]
  [1,] 4.482909e-01 0.55170907
  [2,] 9.479594e-01 0.05204063
  [3,] 8.923553e-01 0.10764474
  [4,] 9.295003e-01 0.07049966
  [5,] 8.880434e-01 0.11195664
  [6,] 9.197367e-01 0.08026327
  [7,] 9.431232e-01 0.05687676
  [8,] 9.460356e-01 0.05396442
  [9,] 6.053829e-01 0.39461708
 [10,] 9.515173e-01 0.04848268

Is there a simple way to do it in R?
- Gundala Viswanath
Jakarta - Indonesia

______________________________________________
R-help@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.

Reply via email to