as.data.table.xts {data.table} | R Documentation |
Efficient conversion xts to data.table.
## S3 method for class 'xts' as.data.table(x, keep.rownames = TRUE, ...)
x |
xts to convert to data.table |
keep.rownames |
keep xts index as index column in result data.table |
... |
ignored, just for consistency with |
## Not run: data(sample_matrix, package = "xts") sample.xts <- xts::as.xts(sample_matrix) # xts might not be attached on search path # print head of xts print(head(sample.xts)) # print dt print(as.data.table(sample.xts)) ## End(Not run)