title: Select max value in one column for every value in the other column
body: <p>I have a dataframe <code>competition</code> with columns <code>branch</code>, <code>phone</code> and <code>sales</code></p>
  <pre><code>| branch   | phone   | sales|
  |----------|---------|------|
  | 123      | milky   | 654  |
  | 456      | lemon   | 342  |
  | 789      | blue    | 966  |
  | 456      | blue    | 100  |
  | 456      | milky   | 234  |
  | 123      | lemon   | 874  |
  | 789      | milky   | 234  |
  | 123      | blue    | 332  |
  | 789      | lemon   | 865  |
  </code></pre>
  <p>I want to show the highest number of sales for every phone:
  The output should be a dataframe <code>winners</code> that look like this</p>
  <pre><code>| branch   | phone   | sales|
  |----------|---------|------|
  | 123      | milky   | 654  |
  | 789      | blue    | 966  |
  | 123      | lemon   | 874  |
  </code></pre>
  <p>I tried order a dataframe by <code>sales</code> first, and then left only 3 top rows,</p>
  <pre><code>competition &lt;- competition[order(competition$sales, decreasing = TRUE ),]
  winners &lt;- head(competition, 3)
  </code></pre>
  <p>But the output shows <code>lemon</code> phone two times with 874 and 865 <code>sales</code></p>