title: R xts financial intraday data - calculate session values?
body: <p>I have an xts object with intraday (1 minute OHLC) financial timeseries data. </p>
  
  <p>How do I add columns representing current day session values such as <code>sessionHigh</code>, <code>sessionLow</code> etc up to this point in time?</p>
  
  <p>To specify further: for any row I'd like to know what so far the highest and lowest price of this day was. At the beginning of the next day this should reset to the high and low price of the first datapoint of the new day.</p>
  
  <p>How do I go about this in R? How do I calculate new columns based on (in this case daily) subsets of the data?</p>