The timestamps of the new time series are the closing times and/or days of the intervals.
E.g. for a weekly aggregation the new timestamp is the last day in that particular week (namely sunday).
In case of previous tick aggregation,
for on = "seconds"/"minutes"/"hours",
the element of the returned series with e.g. timestamp 09:35:00 contains
the last observation up to that point, including the value at 09:35:00 itself.
Please note: In case an interval is empty, by default an NA is returned.. In case e.g. previous
tick aggregation it makes sense to fill these NA's by the function na.locf
(last observation carried forward) from the zoo package.
In case on = "ticks", the sampling is done such the sampling starts on the first tick, and the last tick is always included
For example, if 14 observations are made on one day, and these are 1, 2, 3, ... 14.
Then, with on = "ticks" and k = 3, the output will be 1, 4, 7, 10, 13, 14.