You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
library(xts)
library(data.table)
last(.xts(1:3,1:3))
# [1] 3# but should be (was in 1.9.4):# [,1]#1969-12-31 18:00:03 3
It looks like the change in e011351 is the cause, and it seems like it's just an error in the if statement (|| should be &&).
But changing the || to && will cause xts::last.default to be used any time xts is on the search path, and xts::last.default is slower than data.table::last for vectors, lists, data.frame, or data.table. I think a better solution would have been to replace the call to stop with a call to tail(x, ...). Thoughts?