[R] finding index of maximum value in vector

From: Jean-Luc Fontaine <jfontain_at_free.fr>
Date: Mon 19 Dec 2005 - 06:25:52 EST


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I found:
  max.col(matrix(c(1,3,2),nrow=1))
Is there a more concise/elegant way?
Thanks,

iD8DBQFDpbfAkG/MMvcT1qQRAjGnAJsH+9MWuiv+K+US0McW2fLzRx2LHwCfYpNG gWKLuxnnlNde8WEr7wU5NUM=
=7/gr
-----END PGP SIGNATURE-----



R-help@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 Received on Mon Dec 19 06:33:25 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:41:40 EST