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.
Thank you very much.
_________________________________________________________________
ues clics pour retrouver tout ce qui vous intéresse au même endroit.
[[alternative HTML version deleted]]
______________________________________________
[email protected] 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.