joshuaulrich / xts

Extensible time series class that provides uniform handling of many R time series classes by extending zoo.
http://joshuaulrich.github.io/xts/
GNU General Public License v2.0
220 stars 71 forks source link

.xts creates object with rownames #298

Closed joshuaulrich closed 4 years ago

joshuaulrich commented 5 years ago

.xts() will create an xts object with row names if x has rownames. For example:

m <- matrix(1, dimnames = list("a", "b"))
x <- .xts(m, 1)
rownames(x)
# [1] "a"
y <- xts(m, .POSIXct(1))
rownames(y)
# NULL

This is a bug because xts objects should never have rownames.

joshuaulrich commented 4 years ago

This broke several other unit tests... because I was bad and only ran the one file.