title: Plotting the sum of values in one column a depending on data in another column
body: <p>I'm pretty new to R and to ggplot coming from a spreadsheet background and I'm looking for something very easy to do in a pivot graph. I want to plot sums of values of a given column depending of the category given in another column. </p>
  
  <p>Let's have an example : </p>
  
  <pre><code>element qty category
  apples  2   Red
  apples  1   Green
  apples  4   Red
  apples  3   Green
  apples  6   Yellow
  </code></pre>
  
  <p>I want a graph which plots all the apples depending on their category not by the count in the column category but by the sum of the corresponding values in the qty column. </p>
  
  <p>Meaning 6 red apples 4 green apples and 6 yellow apples... Is there some short way to do this directly in ggplot or do I need to work my data beforehand - fi. with plyr ?</p>
  
  <p>Sorry if this question is a noob question but I wasn't able to find any answer...</p>