# See the calendar specific help pages for more examples
x <- year_month_day(2019, c(1, 1, 2, 2, 3, 3, 4, 4), 1:8)
x
# Group by two months
calendar_group(x, "month", n = 2)
# Group by two days of the month
calendar_group(x, "day", n = 2)
Run the code above in your browser using DataLab