dtt_aggregate | R Documentation |
Aggregates a date/time vector
dtt_aggregate(x, units, ...)
## S3 method for class 'Date'
dtt_aggregate(x, units = "days", ...)
## S3 method for class 'POSIXct'
dtt_aggregate(x, units = "seconds", ...)
## S3 method for class 'hms'
dtt_aggregate(x, units = "seconds", ...)
x |
A date/time vector. |
units |
A string of the time units. The possible values are "secs", "minutes", "hours", "days" or "weeks". |
... |
Unused. |
The possible units values are 'seconds', 'minutes', 'hours', 'days', 'months' or 'years'.
The floored date/time vector.
dtt_aggregate(Date)
: Aggregate a Date vector
dtt_aggregate(POSIXct)
: Aggregate a POSIXct vector
dtt_aggregate(hms)
: Aggregate a hms vector
dtt_aggregate(as.Date(c("1992-01-01", "1991-02-02", "1991-03-03")), "years")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.