[R] minimum value

Jason Turner jasont at indigoindustrial.co.nz
Thu Feb 26 05:03:26 CET 2004


I almost said the same.  But he wanted the index.

which.min(v)

>
> min(v)
>
> -----Original Message-----
> From: r-help-bounces at stat.math.ethz.ch
> [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of li xian
> Sent: Wednesday, February 25, 2004 8:46 PM
> To: R-help at stat.math.ethz.ch
> Subject: [R] minimum value
>
>
> suppose I have a vector called v,
> how can I get the index of the minimum element of vector v?
>
> Thanks!
>
>




More information about the R-help mailing list