Skip to content
Prev 286629 / 398502 Next

aggregating specific parts in zoo index column to perform sliding average

On Mon, Feb 27, 2012 at 10:17 PM, knavero <knavero at gmail.com> wrote:
Add 7.5 minutes before truncating so if x is your times, e.g. x <-
times(0:15/(24 * 60)), then try this:

min15 <- times("00:15:00")
trunc(x + min15/2, min15)