I am new to here and also R. 

For example I have this kind of rainfall data. As is seen in the data for a day, I have hourly rainfall data and I want to convert this hourly data to 6-hourly, 12-hourly and daily datas like the sample. How can I achieve this in R?

![sample data](https://i.stack.imgur.com/mvzIm.png)