title: dplyr select top 10 values for each category
body: <p>I am trying to filter a data frame that contains n rows for n categories.
  I want that each category <code>dimension</code> values are sorted by another column <code>revenues</code> and then, the top 10 values of each <code>dimension</code> are selected and get rid of the rest.</p>
  
  <p>I did an attempt with the following snipper, but it does not seem to achieve what I want to:</p>
  
  <pre><code>data &lt;-  tbl_df(data) %&gt;%
    arrange(revenues) %&gt;%
    group_by(dimension) %&gt;%
    top_n(10)
  </code></pre>