Subsetting a zero-length xts always returns logical type #376
Closed
Description
x <- .xts(matrix(1L)[0,], integer(0))
storage.mode(x)
# [1] "integer"
storage.mode(x["2022",]) # should be "integer"
# [1] "logical"
x <- .xts(matrix(1L)[0,], integer(0))
storage.mode(x)
# [1] "integer"
storage.mode(x["2022",]) # should be "integer"
# [1] "logical"