title: Sum column in data frame based on another column in R
body: <p>I have a data frame like this:</p>
  
  <pre><code>Vehicle    Driver   Distance   Fuel.Consumption
      W01      Alex      22.31               0.58
      W01      Alex      93.21               2.48
      W02     Brian     122.72               3.22
      W02     Brian      22.25                0.5
  ......
  </code></pre>
  
  <p>I want an output like this:</p>
  
  <pre><code>Vehicle    Driver   Distance   Fuel.Consumption   Fuel.Efficiency
      W01     Alex      115.52               3.06             37.75
      W02    Brian      144.97               3.72             38.97      
  ......
  </code></pre>
  
  <p>Just sum the Distance and Fuel.Consumption of each Vehicle and compute the Fuel.Efficiency of each Vehicle.
  I've tried <code>aggregate()</code>, but it's not work like what I would imagine:</p>
  
  <pre><code>aggregate(Distance~Vehicle, df, FUN=sum) 
  </code></pre>