title: Extracting most recent date from rows in a data frame
body: <p>I am working with a data frame that has multiple dates that relate to each other but the bottom line is that I need to extract the most recent date. I have seen examples on here but nothing exactly what I am looking for. So my example data frame is as follows:</p>
  
  <pre><code>ID    date1    date2    date3
  1   01/12/15 02/04/07 07/06/16
  2   03/29/12 02/16/16 09/01/10
  3   12/01/15 07/07/07 11/13/12
  </code></pre>
  
  <p>But what I want is to get an output that gives me:</p>
  
  <pre><code>ID    date1    date2    date3 max
  1   01/12/15 02/04/07 07/06/16 07/06/16
  2   03/29/12 02/16/16 09/01/10 02/16/16
  3   12/01/15 07/07/07 11/13/12 12/01/15
  </code></pre>
  
  <p>I'm seeing people use plyr and dplyr but I am very unfamiliar with those packages. Any help is appreciated!</p>
  
  <p>Edit: I was able to run what was given by @akrun, but I ran into the issue of empty field dates. I have provided an example as follows:</p>
  
  <pre><code>ID    date1    date2    date3
  1   01/12/15 NA 07/06/16
  2   NA 02/16/16 09/01/10
  3   12/01/15 07/07/07 NA
  </code></pre>
  
  <p>So with those empty spots I would still like the data frame to be transformed as following:</p>
  
  <pre><code>ID    date1    date2    date3 max
  1   01/12/15 NA 07/06/16 07/06/16
  2   NA 02/16/16 09/01/10 02/16/16
  3   12/01/15 07/07/07 NA 12/01/15
  </code></pre>