In some cases, conversion sorts the dates and fills any gaps between them with NA.
However, in other cases, conversion requires aggregation. For example,
when aggregating hourly data over a period of k hours to generate daily data,
we expect k numbers in each interval.
The aggregate function can be set to calculate the mean,
variance, median, etc., or any function that takes
the vector of k values and returns a number.