date_group | R Documentation |
date_group()
groups by a single component of a date-time, such as month
of the year, or day of the month.
There are separate help pages for grouping dates and date-times:
dates (Date)
date-times (POSIXct/POSIXlt)
date_group(x, precision, ..., n = 1L)
x |
A date or date-time vector. |
precision |
A precision. Allowed precisions are dependent on the input used. |
... |
These dots are for future extensions and must be empty. |
n |
A single positive integer specifying a multiple of |
x
, grouped at precision
.
# See type specific documentation for more examples
date_group(as.Date("2019-01-01") + 0:5, "day", n = 2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.