[R] Help with arrays

Olivier Charansonney
2014-05-29T16:02:39Z

Hello,

I would like to extract the value in row 1 corresponding to the maximum in
row 2



Array W

          [,1]      [,2]      [,3]      [,4]      [,5]      [,6]      [,7]
[,8]     [,9]    [,10]

[1,] 651.00000 651.00000 651.00000 651.00000 651.00000 651.00000 651.00000
119.00000 78.00000 78.00000

[2,]  13.24184  13.24184  13.24184  13.24184  13.24184  13.24184  13.24184
16.19418 15.47089 15.47089

> valinit<-max(W[2,])

> valinit

[1] 16.19418

How to obtain ‘119’

Thanks,



Dr Olivier Charansonney

Cardiologue

Centre Hospitalier Sud-Francilien, Corbeil-Essonnes, France

Centre Médical Saint Lazare, Paris , France

Hôpital Lariboisière, Paris, France




	[[alternative HTML version deleted]]