title: How best can I summarise the following table data frame in R?
body: <p>How best can I summarise the following table data frame in R? </p>
  
  <pre><code>Driver_ID &lt;- c('AB1','AB1')
  
  Date_today&lt;- as.Date(c('2018-10-24','2018-10-24'))
  
  Motor_Vehicle_Brand &lt;- c('Toyota','VW')
  
  Type_of_vehicle &lt;- c('Corrola','Golf 5')
  
  Country &lt;- c('USA','USA')
  
  Speed &lt;- as.numeric(c('300','400'))
  
  Number_of_brands_drived &lt;- as.numeric(c('1','1'))
  
  car.data &lt;- data.frame(Driver_ID, Date_today,       Motor_Vehicle_Brand,Type_of_vehicle,Country,Speed,Number_of_brands_driven)
  </code></pre>
  
  <p>To Show </p>
  
  <pre><code>Driver_ID &lt;- 'AB1'
  Date_today&lt;- as.Date('2018-10-24')
  Motor_Vehicle_Brand &lt;- c('Toyota VW')
  
  Type_of_vehicle &lt;- 'Corrola Golf 5'
  
  Country &lt;- 'USA'
  
  Speed &lt;- as.numeric('700')
  
  Number_of_brands_drived &lt;- as.numeric('2')
  
  car.data &lt;- data.frame(Driver_ID, Date_today,       Motor_Vehicle_Brand,Type_of_vehicle,Country,Speed,Number_of_brands_driven)
  </code></pre>
  
  <p>I have tried the following code, however it fails to group the way I want it to,</p>
  
  <pre><code>df %&gt;% 
    group_by(DRIVER_ID, Country) %&gt;% 
    mutate(Highest_speed = sum(Highest speed driven), 
           Number_of_brands_driven = sum(Number_of_brands_drived))
  </code></pre>
  
  <p>this however gives me a ungrouped data which is similar to the unsummarised data. </p>
  
  <p>Please assist.</p>