title: Struggling to convert tick data with price and volumes to 5min in R
body: <p>here i have the data like this: </p>
  
  <pre><code>time        price   volume  price*volume
  14:56:42    31.15   173 540327
  14:56:36    31.15   100 311500
  14:56:27    31.16   4   12464
  14:56:24    31.16   1   3116
  14:56:21    31.16   46  143336
  14:56:18    31.15   32  99680
  14:56:15    31.16   6   18696
  14:56:12    31.16   12  37392
  14:56:06    31.16   15  46740
  14:56:03    31.16   54  168264
  14:55:57    31.19   1   3119
  14:55:54    31.19   10  31190
  </code></pre>
  
  <p>when i use <code>to.period()</code>, it just return a xts object with ohlc of price ,the volume and price*volume missing, how would I go about converting data like this to 5min OHLCV</p>