title: removing duplicate dates for a given variable in R
body: <pre><code>Date    Server  CPU
  1/1/2012    WebA    30
  1/1/2012    WebA    25
  1/1/2012    WEbB    30
  1/2/2012    WebA    45
  1/2/2012    WebA    50
  1/2/2012    WebA    60
  
  dput(x)
  structure(list(Date = structure(c(1L, 1L, 1L, 2L, 2L, 2L), .Label = c("1/1/2012", 
  "1/2/2012"), class = "factor"), Server = structure(c(1L, 1L, 
  2L, 1L, 1L, 1L), .Label = c("WebA", "WEbB"), class = "factor"), 
      CPU = c(30L, 25L, 30L, 45L, 50L, 60L)), .Names = c("Date", 
  "Server", "CPU"), class = "data.frame", row.names = c(NA, -6L
  ))
  </code></pre>
  
  <p>I should have one data point for each data for a given Server. I need to remove duplicate dates. When I pick the Date, CPU should be the highest. For example, for Date 1/2/2012, my new row would be <code>1/2/2012 WebA 60</code>.</p>
  
  <p>How do I go about removing the duplicate dates in R?</p>
  
  <p>I can do this:</p>
  
  <pre><code>x[!duplicated(x[1:2]),]
  </code></pre>
  
  <p>from the CPU, how do I check the highest?</p>