Hello to all --
My apologies for what I know to be an elementary question, but cannot seem
to find the answer to.
I would like to extract the row name of a matrix where the third column has
it's maximum value. I know that dimnames(matrix)[1] gives the row names
and that max(matrix[,3]) gives the maximum in the third column, but I just
can't figure out how to put the two together. I tried
dimnames(matrix)[1[max(matrix)[,3]] but that didn't work.
A point in the right direction would be much appreciated. I'm using S-Plus
6.2 in Windows.
Thanks,
Sarah
|