title: mean, max, min functions with ddply
body: <p>I have a  large meteorological data set with half hour values. I'm using the ddply function to then create daily values (means, sums, etc), however i am experiencing problems with the getting min and max values! For some values e.g. air temperature i would like to extract the daily mean, min and max, however the data frame returned gives me min and max values which are the same as the mean. Could somebody have a look at the command i wrote to see if they spot any errors?</p>
  
  <pre><code>HFTda &lt;- ddply (HFT, .(Year, DOY),summarise, 
                  Temp = mean (Temp, na.rm = F), 
                  Tmax = max (Temp, na.rm = F),
                  Tmin = min (Temp, na.rm = F),
                  RHmax = max (RH.x, na.rm = F), 
                  RHmin = min (RH.x, na.rm = F),
                  VPD = mean (VPD.x, na.rm = F), 
                  Grad = mean (GradInc2, na.rm = F), 
                  Gex = mean (Gex, na.rm = F),
                  Prec = sum (Prec, na.rm = F), 
                  H = mean (HFill, na.rm = F), 
                  LE = mean (LEFill, na.rm = F), 
                  NEE = mean (co2_fluxFill, na.rm = F), 
                  ET = mean (h2o_fluxFill, na.rm = F), 
                  SWout = mean (YB5214h, na.rm = F))
  </code></pre>