Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

as.data.table.xts

Convert an xts object into a data.table


Description

Convert an xts object into a data.table

Usage

## S3 method for class 'xts'
as.data.table(x)

as.data.table(x)

## Default S3 method:
as.data.table(x, ...)

Arguments

x

An xts object

...

Catch-all arguments passed on to methods

Details

This is still experimental. Note that all four added columns are keys to the data.table object, and that setNumericRounding(0) is executed too,

Value

A data.table object with new columns date, time, micros, pt providing, respectively the data as IDate, time as ITime, microseconds (rounded) and numeric POSIXct.

Author(s)

Dirk Eddelbuettel


dang

'Dang' Associated New Goodies

v0.0.13
GPL (>= 2)
Authors
Dirk Eddelbuettel with contributions by Brodie Gaslam, Kevin Denny, Kabira Namit, Colin Gillespie, R Core, Josh Ulrich, and others.
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.