Re: [R] Extract index column the max

2012-03-28 Thread David Winsemius
On Mar 28, 2012, at 11:18 AM, MSousa wrote: Hello, I have this data.frame, and i need the value the column where the value in matrix is maximum res3 77 86 93 106 161 77 20 0 0 1 0 86 1 12 1 2 1 93 0 2 3 3 0 106 0 4 3 18 0 161 0 0 0 1 55 I use

[R] Extract index column the max

2012-03-28 Thread MSousa
Hello, I have this data.frame, and i need the value the column where the value in matrix is maximum res3 77 86 93 106 161 77 20 0 0 1 0 86 1 12 1 2 1 93 0 2 3 3 0 106 0 4 3 18 0 161 0 0 0 1 55 I use this d<-which(res3==max(res3), arr.ind=