title: How to sort unique values based on another column in R
body: <p>I would like to extract unique values based on the sum in another column. For example, I have the following data frame <code>"music"</code></p>
  
  <pre><code>ID    | Song            |  artist       | revenue 
  7520  | Dance with me   |   R kelly     |   2000    
  7531  | Gone girl       |   Vincent     |   1890     
  8193  | Motivation      |   R Kelly     |   3500     
  9800  | What            |   Beyonce     |  12000    
  2010  | Excuse Me       |   Pharell     |   1010     
  1999  | Remove me       |   Jack Will   |    500      
  </code></pre>
  
  <p>Basically, I would like to sort the top 5 artists based on revenue, without the duplicate entries on a given artist</p>