My data looks something like this:
|Month|Date|Day|Mins|Calories|Type|
|March|16|Monday|00:12:20||Running|
|March|17|Tuesday|00:44:11|140|Strength|
|March|19|Thursday|00:15:42||Running|
|April|2|Thursday|00:43:13|140|Strength|
|April|5|Sunday|00:30:00|65|Core|
|April|6|Monday|00:30:09|90|Cardio|
and so on until December. I want to add a row below every month which give the values- Total no of calories, no of days worked out- a basic summary. I have tried to use dplyr & tidyverse but not getting the correct results & the format I want it in.
The below script gives me by Month but I cannot add a new row.
wd %>%
group_by(Month) %>%
summarise(Total_Cal = sum(Calories))
Please advise.