Potential bug in as.data.table.xts when converting a single-row xts
object. Using the dev version from GitHub.
library(xts)
library(data.table)
x <- as.xts(8, order.by = Sys.Date())
## Single-row conversion doesn't work.
as.data.table(x)
Error in as.data.frame.matrix(coredata(x), row.names, optional, ...) :
row names must be 'character' or 'integer', not 'logical'
## Two rows work fine.
as.data.table(rbind(x, x))
index V1
1: 2016-01-03 8
2: 2016-01-03 8
_______________________________________________
datatable-help mailing list
[email protected]
https://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/datatable-help