Buckets a datetime column to a grid (every) and aggregates within each
bucket – the time-series form of group_by() + summarise(). Equivalent
to mutate(<time> = floor_time(<time>, every)), group_by(<time>), then
summarise(...).
Arguments
- .data
A
vectra_node.- time
The datetime column to bucket (unquoted).
- every
Bucket size as a string, e.g.
"1 hour","15 min","day","month"(seefloor_time()).- ...
Named aggregation expressions, as in
summarise()(e.g.mean_temp = mean(temp)).- .name
Optional name for the bucket column. Defaults to the name of
time(the original column, replaced by its floored value).
Value
A vectra_node with one row per occupied bucket: the bucket column
followed by the aggregates. The bucket collects as a numeric epoch value
(see floor_time() on restoring the date class).