[R] Retrieving locations of element of a vector or matrix

From: Yemi Oyeyemi <gmoyeyemi_at_yahoo.com>
Date: Mon, 31 Mar 2008 06:59:42 -0700 (PDT)


Hello all,
  I have a problem of getting the locations of elements in a vector or matrix. I know one can use the command "which.min" or which.max" to get the location of minimum or maximum values in a vector. But is there any command to get the first k minimum values or maximum values in a vector.   Thanks        



You rock. That's why Blockbuster's offering you one month of Blockbuster Total Access, No Cost.

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Mon 31 Mar 2008 - 14:04:23 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Mon 31 Mar 2008 - 15:00:26 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive