title: Subseting with ddply
body: <p>I know this should be straightforward, but I am having problems splitting a data frame with ddply.</p>
  
  <pre><code>ID = c(1,1,1,2,2,2,2,3,4,4,4,4)
  date = c("4th Nov","4th Nov","5th Nov","5th Nov","6th Nov","7th Nov","7th Nov","8th Nov","6th Nov","6th Nov","7th Nov","7th Nov")
  df&lt;-data.frame(ID,date)
  </code></pre>
  
  <p>All I want is to work out the number of unique IDs I have in a very large dataset (so in the example above I would just get 4).  The numbers in my real dataset are not continuous though, so I can't just work out the maximum.</p>
  
  <p>I have been trying to get the code to split the dataframe so each unique ID will just be included once in the new dataframe, and then I was hoping just to count the number of rows to give me the total.  Perhaps I don't even need ddply - could I just do this in one line of code?</p>
  
  <p>Sorry for my ignorance, and thanks in advance for your help!</p>