rownames(which(example == max(example), arr.ind=TRUE))
Uwe Ligges
On 02.05.2011 13:54, Schumacher, G. wrote:
Dear All,
Probably a very basic question, but can't seem to work my way around it.
I want to which row has the maximum value. But what if the row names do not correspond with the row
elp-boun...@r-project.org] On
Behalf Of Schumacher, G.
Sent: Monday, May 02, 2011 7:54 AM
To: 'r-help@r-project.org'
Subject: [R] how to get row name using the which function
Dear All,
Probably a very basic question, but can't seem to work my way around it.
I want to which row has
Dear All,
Probably a very basic question, but can't seem to work my way around it.
I want to which row has the maximum value. But what if the row names do not
correspond with the row numbers. In the example below, you'll see that the max
of example is row 4, but the name of row 4 is "9". How do
3 matches
Mail list logo