Re: [R] (sans objet)

From: Douglas Bates <bates_at_stat.wisc.edu>
Date: Wed 04 Apr 2007 - 17:38:17 GMT

On 4/4/07, croero@hotmail.com <croero@hotmail.com> wrote:
> Hello,
>
> Is there any function "argmax" in R ?
>
> For example, if I have the vector x=c(1,4,15,7,6), max(x)=15.
> But I need a function f such that f(x)=3, 3 being the number where 15 is.

which.max



R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Thu Apr 05 03:41:29 2007

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Wed 04 Apr 2007 - 18:30:56 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.