Hi I have data in xts format like this
> ITXxts
Time Price Volume
2014-07-18 09:00:00 67.63 460
2012-04-27 09:00:00 67.63 73
2012-04-27 09:00:00 67.63 85
2012-04-27 09:00:01 67.63 3
2012-04-27 09:01:03 67.79 1
2012-04-27 09:01:16 67.64 91
2012-04-27 09:05:50 67.83 75
Now aggregated the series into 5 minute blocks
tsagg5min =aggregatets(ITXxts,on="minutes",k=5)
2014-07-18 09:05:00 67.45 43
2014-07-18 09:10:00 67.82 12
2014-07-18 09:15:00 67.91 341
2014-07-18 09:20:00 67.70 275
chartSeries(tsagg5min)
Now my question is I want to plot it in the OHLC format in such a way that It calculates the the Open High Low and Close of each 5 minute chunk in which the data was aggregated