[R] how to find index of maximum?
Chong Gu
chong at stat.purdue.edu
Mon Jul 12 18:21:22 CEST 1999
X-Authentication-Warning: stat.math.ethz.ch: majordom set sender to owner-r-help at stat.math.ethz.ch using -f
Date: Mon, 12 Jul 1999 15:27:27 +0200
From: Peter Holzer <holzer at stat.math.ethz.ch>
Sender: owner-r-help at stat.math.ethz.ch
Precedence: bulk
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
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
rev(order(x))[1]
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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