title: R: return a value from one column in a data frame corresponding to the minimum value in another column
body: <p>So I realize the title isn't the best, but I wasn't sure how else to word it. My problem seems like it should be very simple, but I'm very much an R novice so I 'm not sure how to do it.</p>
  
  <p>Let's say I have a data frame such as:</p>
  
  <pre><code>X Y
  A 1
  B 2
  C 3
  D 4
  E 5
  </code></pre>
  
  <p>How would I go about returning the corresponding X value for the minimum Y? In this case, I'd want it to return A since the minimum value in the column Y is 1.</p>
  
  <p>I'm not even sure where to start with this, so forgive my lack of example code, because I don't have any. </p>