-----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-----
Kjetil Brinchmann Halvorsen
2005-Dec-18 19:37 UTC
[R] finding index of maximum value in vector
Jean-Luc Fontaine wrote:> -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > I found: > max.col(matrix(c(1,3,2),nrow=1)) > Is there a more concise/elegant way?which.max> 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----- > > ______________________________________________ > R-help at 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 >