[R] Row number of minimum value?

2009-05-17 Thread MikSmith
Hi This *must* be an insanely easy thing to work out, but I'm not too familiar with R syntax. So how do I work out the row number (if I pass a column) of the minimum value?? I can get the value itself from min(), but where can I get the row?? Many thanks mike -- View this message in context:

Re: [R] Row number of minimum value?

2009-05-17 Thread Adrian Dusa
Hi Mike, On Sunday 17 May 2009, MikSmith wrote: Hi This *must* be an insanely easy thing to work out, but I'm not too familiar with R syntax. So how do I work out the row number (if I pass a column) of the minimum value?? I can get the value itself from min(), but where can I get the row??

Re: [R] Row number of minimum value?

2009-05-17 Thread MikSmith
Hi Adrian Many thanks. That works perfectly! It's easy when you know the answer :) mike Adrian Dusa wrote: Hi Mike, On Sunday 17 May 2009, MikSmith wrote: Hi This *must* be an insanely easy thing to work out, but I'm not too familiar with R syntax. So how do I work out the row

Re: [R] Row number of minimum value?

2009-05-17 Thread Uwe Ligges
Adrian Dusa wrote: Hi Mike, On Sunday 17 May 2009, MikSmith wrote: Hi This *must* be an insanely easy thing to work out, but I'm not too familiar with R syntax. So how do I work out the row number (if I pass a column) of the minimum value?? I can get the value itself from min(), but where

Re: [R] Row number of minimum value?

2009-05-16 Thread Ben Bolker
MikSmith wrote: This *must* be an insanely easy thing to work out, but I'm not too familiar with R syntax. So how do I work out the row number (if I pass a column) of the minimum value?? I can get the value itself from min(), but where can I get the row?? ?which ?which.min Ben Bolker