title: Find the max and min value within each group
body: <p>I want to find the max and min for each Gene in the following table.
  I know, that the following function gives the max (or min), but I could not manage to get both at the same time.</p>
  
  <pre><code>tapply(df$Value, df$Gene, max)
  </code></pre>
  
  <p>Appreciate!</p>
  
  <p>Small test set:</p>
  
  <pre><code>df &lt;- read.table(header = TRUE, text = 'Gene   Value
  A      12
                   A      10
                   A      123
                   A      1
                   B      3
                   B      5
                   B      6
                   C      1
                   D      3
                   D      45
                   D      98
                   D      234
                   D      4')
  </code></pre>