title: Grouping data using R and plotting
body: <p>I have data that shows the activity for various IDs at various times. What I would like to be able to do is to group together the IDs and then list the EVENT_TYPEs chronologically. I would then like to be able to plot when an EVENT occurred in time (time on the y-axis and ID on the x?) The data I have looks like this </p>
  
  <pre><code>       ID        DATE_EVENT TIME_EVENT EVENT_TYPE
    1:   520424473 07/08/2014   09:28:16      9,210      
    2:   504344215 07/08/2014   09:10:27      1,000    
    3:   051745297 07/08/2014   09:40:16      1,000    
    4:   961837100 07/08/2014   09:44:13      1,000     
    5:   412980113 07/08/2014   09:40:59      1,000
    6:   051745297 07/08/2014   09:40:23      9,034
    7:   520424473 07/08/2014   09:28:22      1,000
  </code></pre>
  
  <p>I have grouped data before using</p>
  
  <pre><code>library(data.table) 
  setDT(Allvol)[, list(mean = mean(volume, na.rm = T), sd=sd
                       sd = sd(volume, na.rm = T)), by = ID]
  </code></pre>
  
  <p>in order to work out the mean and s.d, however that dataset was slightly different and I had a column for volumes associated with EVENT_TYPES. I think I need something similar but am not sure how to approach this.</p>
  
  <p>Any help is much appreciated!</p>