title: Group/bin/bucket data in R and get count per bucket and sum of values per bucket
body: <p>I wish to bucket/group/bin data :</p>
  
  <pre><code>C1             C2       C3
  49488.01172    0.0512   54000
  268221.1563    0.0128   34399
  34775.96094    0.0128   54444
  13046.98047    0.07241  61000
  2121699.75     0.00453  78921
  71155.09375    0.0181   13794
  1369809.875    0.00453  12312
  750            0.2048   43451
  44943.82813    0.0362   49871
  85585.04688    0.0362   18947
  31090.10938    0.0362   13401
  68550.40625    0.0181   14345
  </code></pre>
  
  <p>I want to  bucket it by C2 values but I wish to define the buckets e.g. &lt;=0.005, &lt;=.010, &lt;=.014 etc. As you can see, the bucketing will be uneven intervals. I want the count of C1 per bucket as well as the total sum of C1 for every bucket.</p>
  
  <p>I don't know where to begin as I am fairly new a user of R. Is there anyone willing to help me figure out the code or direct to me to an example that will work for my needs?</p>
  
  <p>EDIT: added another column C3. I need sum of C3 per bucket as well at the same time as sum and count of C1 per bucket</p>