Is it expected that the new version of frollapply() and frollsum() for data.table version 1.18 behave differently when the window length is larger than the data object? Or is this a bug?
The difference noted below does not happen using data.table version 1.17.
Using frollsum() the output always has the same length as the input object:
frollsum(c(1,2,3,4,5),n=5)
[1] NA NA NA NA 15
frollsum(c(1,2,3,4,5),n=6)
[1] NA NA NA NA NA
frollsum(c(1,2,3,4,5),n=7)
[1] NA NA NA NA NA
But using frollapply() the output can be longer than the input object:
frollapply(c(1,2,3,4,5),N=5,FUN=sum)
[1] NA NA NA NA 15
frollapply(c(1,2,3,4,5),N=6,FUN=sum)
[1] NA NA NA NA NA
frollapply(c(1,2,3,4,5),N=7,FUN=sum)
[1] NA NA NA NA NA NA