[R] finding index of maximum value in vector

Jean-Luc Fontaine jfontain at free.fr
Sun Dec 18 20:25:52 CET 2005


-----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,

- --
Jean-Luc Fontaine  http://jfontain.free.fr/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

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




More information about the R-help mailing list