title: R transform data frame (group by)
body: <p>I am an R and Stack Overflow newbie so hope I'm following protocol here.</p>
  
  <p>How do I transform a data frame like:</p>
  
  <pre><code>FRUIT   NUMBER  NAME    AGE
  apples  5       Joe     13
  oranges 6       Joe     13
  apples  2       Mary    10
  oranges 4       Mary    10
  </code></pre>
  
  <p>into a grouped data fame like:</p>
  
  <pre><code>NAME    AGE  APPLES ORANGES
  Joe     13   5       6
  Mary    10   2       4
  </code></pre>
  
  <p>Thanks in advance.</p>