title: Select rows with min value by group
body: <p>I got a problems that bugs me for some time… hopefully anybody here can help me.</p>
  
  <p>I got the following data frame</p>
  
  <pre><code>f &lt;- c('a','a','b','b','b','c','d','d','d','d')
  v1 &lt;- c(1.3,10,2,10,10,1.1,10,3.1,10,10)
  v2 &lt;- c(1:10)
  df &lt;- data.frame(f,v1,v2)
  </code></pre>
  
  <p>f is a factor; v1 and v2 are values.
  For each level of f, I want only want to keep one row: the one that has the lowest value of v1 in this factor level.</p>
  
  <pre><code>f   v1  v2
  a   1.3 1
  b   2   3
  c   1.1 6
  d   3.1 8
  </code></pre>
  
  <p>I tried various things with aggregate, ddply, by, tapply… but nothing seems to work. For any suggestions, I would be very thankful. </p>