EVOLUTION-MANAGER
Edit File: as.data.table.xts.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Efficient xts to as.data.table conversion</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for as.data.table.xts {data.table}"><tr><td>as.data.table.xts {data.table}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Efficient xts to as.data.table conversion</h2> <h3>Description</h3> <p>Efficient conversion xts to data.table. </p> <h3>Usage</h3> <pre> ## S3 method for class 'xts' as.data.table(x, keep.rownames = TRUE, key=NULL, ...) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p>xts to convert to data.table</p> </td></tr> <tr valign="top"><td><code>keep.rownames</code></td> <td> <p>Default is <code>TRUE</code>. If <code>TRUE</code>, adds the xts input's index as a separate column named <code>"index"</code>. <code>keep.rownames = "id"</code> names the index column <code>"id"</code> instead.</p> </td></tr> <tr valign="top"><td><code>key</code></td> <td> <p> Character vector of one or more column names which is passed to <code><a href="setkey.html">setkeyv</a></code>. </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p>ignored, just for consistency with <code>as.data.table</code></p> </td></tr> </table> <h3>See Also</h3> <p><code><a href="as.xts.data.table.html">as.xts.data.table</a></code> </p> <h3>Examples</h3> <pre> if (requireNamespace("xts", quietly = TRUE)) { 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 data.table print(as.data.table(sample.xts)) } </pre> <hr /><div style="text-align: center;">[Package <em>data.table</em> version 1.14.4 <a href="00Index.html">Index</a>]</div> </body></html>