title: Determining minimum values in a vector in R
body: <p>I need some help in determining more than one minimum value in a vector. Let's suppose, I have a vector x:</p>
  
  <pre><code>x&lt;-c(1,10,2, 4, 100, 3)
  </code></pre>
  
  <p>and would like to determine the indexes of the smallest 3 elements, i.e. 1, 2 and 3.  I need the indexes of because I will be using the indexes to access the corresponding elements in another vector. Of course, sorting will provide the minimum values but I want to know the indexes of their actual occurrence prior to sorting.</p>