Summary values for type POSIXct are calculated as the median, because the
mean can be nonsensical at times (e.g., the mean of Day1 18:00 and Day2
18:00, is Day2 6:00, which can be the desired result, but if the focus is on
time, rather then on datetime, it is recommended that values are converted to
times via hms::as_hms() before applying the function (the mean of 18:00 and
18:00 is still 18:00, not 6:00). Using the median as a default handler
ensures a more sensible datetime.
aggregate_Date() splits the Datetime column into a Date.data
and a Time column. It will create subgroups for each Time
present in a group and aggregate each group into a single day, then remove
the sub grouping.
Use the ... to create summary statistics for each group, e.g. maximum or
minimum values for each time point group.
Performing aggregate_Datetime() with any unit and then
aggregate_Date() with a unit of "none" is equivalent to just using
aggregate_Date() with that unit directly (provided the other arguments
are set the same between the functions). Disentangling the two functions
can be useful to split the computational cost for very small instances of
unit in large datasets. It can also be useful to apply different handlers
when aggregating data to the desired unit of time, before further
aggregation to a single day, as these handlers as well as ... are used
twice if the unit is not set to "none".