[R] how to find index of maximum?

Peter Holzer holzer at stat.math.ethz.ch
Mon Jul 12 15:27:27 CEST 1999


Dear R-users,

Is there a simple way to find the index of the maximum of a vector? 

Ex.

1 3 6 2

result: 3

Thanks for any help, Peter

____________________________________________________________

Peter Holzer                      phone: + 41 1 632 46 34
Seminar fuer Statistik, SOL F7    fax:   + 41 1 632 10 86
(Sonneggstr. 33)                  <holzer at stat.math.ethz.ch>
ETH (Federal Inst. Technology)
8092 Zurich                       http://www.stat.math.ethz.ch/~holzer/
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list