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

which.min(v)

>
> min(v)
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of li xian
> Sent: Wednesday, February 25, 2004 8:46 PM
> To: [EMAIL PROTECTED]
> 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!
>
>

______________________________________________
[EMAIL PROTECTED] mailing list
https://www.stat.math.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Reply via email to