I know questions like this have been answered a ton of times here, and trust me I have tried all the methods I could find of i.e. xts, dplyr, zoo etc. but nothing worked for me.
What I basically want to do is aggregating the calories so that they display the sum amount in hourly timeframe. In SQL that would mean using GROUP BY and SUM but I don't know how to translate that into R.
My current dataset min_cal_narrow: https://i.ibb.co/Db8Z6pX/Current-Form.png
What I want to achieve: https://i.ibb.co/HKcxHdt/Ideal.png
Could anyone kindly point me towards the right direction?
Thanks.