[R] index of max value ?

ryszard.czerminski@pharma.novartis.com ryszard.czerminski at pharma.novartis.com
Fri Nov 14 20:05:32 CET 2003


Is there a function in R, which would return index of maximum value
in a vector ?

e.g.

> v <- round(10*rnorm(8))
> v
[1]   6  -3  -6  15   7   9   0 -19
> max(v)
[1] 15

??? index.max(v)
??? 4




More information about the R-help mailing list