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
Hi there, there seems to be changes in the way the function first treats vector when given a negative argument.
Expected behavior
previously the function first(vect, -1) will return the original vect minus the number at the first index for xts version 0.11 but now in xts 0.12 the behaviour changes. I am not sure what it is trying to do anymore
Minimal, reproducible example
x<- c(1,2,3,4)
first(x,-1)
this will now return c(3, 4) in xts version 0.12
seems like a bug as the result is quite unexpected ?
The text was updated successfully, but these errors were encountered:
This does look like a bug, but it's not a change in behavior in 0.12-0. This behavior was covered by a unit test before the 0.11-0 release. It was added in commit eb7cc4a. If this is a bug, it likely affects last() also.
I just checked, and found that the existing tests use an input vector of 3 elements. They fail if they are lengthened to 4 elements. So this is certainly a bug.
Description
Hi there, there seems to be changes in the way the function first treats vector when given a negative argument.
Expected behavior
previously the function first(vect, -1) will return the original vect minus the number at the first index for xts version 0.11 but now in xts 0.12 the behaviour changes. I am not sure what it is trying to do anymore
Minimal, reproducible example
this will now return c(3, 4) in xts version 0.12
seems like a bug as the result is quite unexpected ?
The text was updated successfully, but these errors were encountered: