Closed jangorecki closed 4 years ago
We have just recently spotted this inconsistency (with relation to last function) in data.table. It was now amended. It looks to be the same in xts.
last
A = numeric() xts::first(A) #[1] NA xts::last(A) #numeric(0)
IMO it make sense to return numeric(0) from first(numeric()). xts 0.11.2
numeric(0)
first(numeric())
Hi Jan, thanks for the report! I agree that both first() and last() should return numeric(0). That is consistent with head() and tail(). I will fix.
first()
last()
head()
tail()
We have just recently spotted this inconsistency (with relation to
last
function) in data.table. It was now amended. It looks to be the same in xts.IMO it make sense to return
numeric(0)
fromfirst(numeric())
. xts 0.11.2