[R] argmax
Elio Mineo
mineoeli at unipa.it
Wed Apr 4 17:31:28 CEST 2007
which.max(x)
Il giorno mer, 04/04/2007 alle 15.13 +0000, croero at hotmail.com ha
scritto:
> Hello,
>
> Is there any function that returns the argmax of a vector ?
>
> For example I have the vector x=(1,4,15,6,7)
>
> max(x)=15
>
> I want a function f such that f(x)=3 because this is where max(x) is.
>
> Thank your very much.
>
> P.S. : I know it is a basic question but I have not figured it out by myself.
> _________________________________________________________________
>
> ues clics pour retrouver tout ce qui vous intresse au mme endroit.
>
> [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at 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.
More information about the R-help
mailing list