title: Matching multiple date values in R
body: <p>I have the following dataframe DF describing people that have worked on a project on certain dates:</p>
  
  <pre><code>ID    ProjectName    StartDate 
  1       Health        3/1/06 18:20
  2       Education     2/1/07 15:30
  1       Education     5/3/09 9:00
  3       Wellness      4/1/10 12:00
  2       Health        6/1/11 14:20
  </code></pre>
  
  <p>The goal is to find  the first project corresponding to each ID. For example the expected output would be as follows:</p>
  
  <pre><code>ID    ProjectName    StartDate 
  1       Health        3/1/06 18:20
  2       Education     2/1/07 15:30
  3       Wellness      4/1/10 12:00
  </code></pre>
  
  <p>So far  I have done the following to get the first StartDate for each ID:</p>
  
  <pre><code>sub &lt;- ddply(DF, .(ID), summarise, st = min(as.POSIXct(StartDate)));
  </code></pre>
  
  <p>After this, I need to match each row in sub with the original DF and extract the projects corresponding to that ID and StartDate. This can be done in a loop for each row in sub. However, my dataset is very large and I would like to know if there is an efficient way to do this matching and extract this subset from DF.</p>