title: using summarize in ddply to get entire row based on max() of one column
body: <p>df1</p>
  
  <pre><code>  primer timepoints        mean          sde
      Acan          0   1.0000000 0.000000e+00
      Acan         20   0.8758265 7.856192e-02
      Acan         40   1.0575400 4.680159e-02
      Acan         60   1.2399106 2.238616e-01
      Acan        120   1.1710685 2.085558e-02
      Acan        240   1.6430670           NA
      Acan        360   1.7747940           NA
  </code></pre>
  
  <p>all I want is the max value of mean (for any of these timepoints) w/ it's corresponding sde.</p>
  
  <pre><code>   ## this will only get me the mean obviously 
     x &lt;- ddply(x, .(primer), summarize, max = max(mean)) 
  
   primer        max
     Acan   1.774794
  
  
  ## if I were to do this I would obviously not have just the maximum values 
     x &lt;- ddply(x. .(primer,sde), summarize, max = max(mean))
  </code></pre>
  
  <p>one idea I had would be to may be to include timepoints in the df then match the two data frames to get a column of sdes. Then cbind that to the df w/ only means.</p>
  
  <p>But I feel as if there is an easier way to do this w/ ddply </p>