Skip to content
Back to formatted view

Raw Message

Message-ID: <20051229162052.26115.qmail@web26814.mail.ukl.yahoo.com>
Date: 2005-12-29T16:20:52Z
From: Florent Bresson
Subject: search in matrix

I'm dealing with a matrix like :

     "x"  "y"  "z"
[1,]  2    4     1
[2,]  6    1     2
...
[n,]  7    3     1

For each row I would like to know the header of the
column which corresponds to the minimum value. In the
case of my matrix, I would like to obtain the
following vector :

z y ... z

Any idea ?