xts subset does not allow NA in 'i' like zoo does.
require(xts)
x <- .xts(matrix(1:20, 10, 2), 1:10)
z <- as.zoo(x)
i <- c(1, NA, 5)
z[i,]
##
## 1969-12-31 18:00:01 1 11
## 1969-12-31 18:00:05 5 15
## <NA> NA NA
x[i,]
## Error in `[.xts`(x, i, ) :
## only zeros may be mixed with negative subscripts
Making this consistent will not be a breaking change since it is currently an error in xts.
xts subset does not allow
NA
in 'i' like zoo does.Making this consistent will not be a breaking change since it is currently an error in xts.