title: Aggregate a data.frame by time series and with different functions
body: <p>I have lots of measurement values, recorded each minute. Of some values have mean, min and max values for the given minute. I'd like to summarize/aggregate the whole data.frame to have one entry every 30 minutes, so </p>
  
  <pre><code>str(wgData)
  'data.frame':   115200 obs. of  7 variables:
   $ TIMESTAMP          : POSIXct, format: "2012-11-24 00:00:00" "2012-11-24 00:01:00" "2012-11-24 00:02:00" 7"2012-11-24 00:03:00" ...
   $ RECORD             : int  11683 11684 11685 11686 11687 11688 11689 11690 11691 11692 ...
   $ TPanel             : num  -0.075 -0.075 -0.075 -0.095 -0.095 -0.095 -0.095 -0.118 -0.118 -0.118 ...
   $ VBattery           : num  13.8 13.8 13.8 13.8 13.8 ...
   $ VBatteryHeating_Avg: num  12.2 12.2 12.2 12.2 12.2 ...
   $ VBatteryHeating_Min: num  12.2 12.2 12.2 12.2 12.2 ...
   $ VBatteryHeating_Max: num  12.2 12.2 12.2 12.2 12.2 ...
  </code></pre>
  
  <p>So I'd like to calculate for every 30 minutes: <code>TIMESTAMP</code>, mean of <code>TPanel</code> (Temperatur of Panel), mean of <code>VBattery</code>, mean of <code>VBatteryHeating_Avg</code>, min of <code>VBatteryHeating_Min</code>, max of <code>VBatteryHeating_Max</code></p>
  
  <p>I had some success by doing</p>
  
  <pre><code>wgData30min &lt;- aggregate(list(TP = wgData$TPanel, VB=wgData$VBatteryHeating_Avg, VB_MIN=wgData$VBatteryHeating_Min, VB_MAX=wgData$VBatteryHeating_Min),
                 list(Timestamp = cut(wgData$TIMESTAMP, "30 min")),
                 mean)
  head(wgData30min)
              Timestamp         TP       VB   VB_MIN   VB_MAX
  1 2012-11-24 00:00:00 -0.1621667 12.15467 12.15333 12.15333
  2 2012-11-24 00:30:00 -0.4751667 12.13333 12.13133 12.13133
  3 2012-11-24 01:00:00 -0.5647333 12.11167 12.11067 12.11067
  4 2012-11-24 01:30:00 -0.4573667 12.09133 12.08967 12.08967
  5 2012-11-24 02:00:00 -0.4923667 12.07100 12.07000 12.07000
  6 2012-11-24 02:30:00 -0.6469000 12.04933 12.04733 12.04733
  </code></pre>
  
  <p>... but did not manage to pass an array of functions to apply  to the columns. Any help is appreciated.</p>