title: Find the top n rows with ties in R using head
body: <p>Suppose I had the following data frame <em>t1</em>:</p>
  
  <pre><code>names &lt;- c('Jack', 'Jill', 'Jane', 'John', 'Job', 'Jim', 'Jason')
  pylons &lt;- c(10,5,4,4,3,1,1)
  
  t1 &lt;- data.frame(names,pylons)
  t1
  head(t1, 5)
  </code></pre>
  
  <p>But I wanted the top 5 rows that included ties. In this case, there are two 4s that tie for 3rd place.  When I do the <em>head(t1, 5)</em>, I get:</p>
  
  <pre><code>1   Jack    10      
  2   Jill    5       
  3   Jane    4       
  4   John    4       
  5   Job     3
  </code></pre>
  
  <p>but I'd also like to see Jim included in this example because Jane &amp; John tie for 3rd place.</p>
  
  <p>Is this possible with the head command in R?</p>