I would like to group my data by months and show the total values of each month.
This is the code I have
test2 <- test %>%
mutate(date=as.Date(date,format="%Y-%m-%d")) %>%
group_by(month = floor_date(date,"month"))%>%
summarise(predicts=sum(predicts))
This is what I am getting
predicts
1 74622000
Here is a sample of my data
date predicts
1 2012-01-02 17282.96
2 2012-01-03 17025.44
3 2012-01-04 16815.49
4 2012-01-05 16935.29
5 2012-01-06 18311.89