EVOLUTION-MANAGER
Edit File: coredata.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: Extract/Replace Core Data of an xts Object</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 coredata.xts {xts}"><tr><td>coredata.xts {xts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Extract/Replace Core Data of an xts Object </h2> <h3>Description</h3> <p>Mechanism to extract and replace the core data of an <code>xts</code> object. </p> <h3>Usage</h3> <pre> ## S3 method for class 'xts' coredata(x, fmt=FALSE, ...) xcoredata(x,...) xcoredata(x) <- value </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p> an <code>xts</code> object </p> </td></tr> <tr valign="top"><td><code>fmt</code></td> <td> <p> should the rownames be formated in a non-standard way </p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p> non-core attributes to assign </p> </td></tr> <tr valign="top"><td><code>...</code></td> <td> <p> further arguments [unused] </p> </td></tr> </table> <h3>Details</h3> <p>Extract coredata of an <code>xts</code> object - removing all attributes except <code>dim</code> and <code>dimnames</code> and returning a matrix object with rownames converted from the index of the <code>xts</code> object. </p> <p>The <code>fmt</code> argument, if TRUE, allows the internal index formatting specified by the user to be used. Alternatively, it may be a valid formatting string to be passed to <code>format</code>. Setting to FALSE will return the row names by simply coercing the index class to a character string in the default manner. </p> <p><code>xcoredata</code> is the functional complement to <code>coredata</code>, returning all of the attributes normally removed by <code>coredata</code>. Its purpose, along with the replacement function <code>xcoredata<-</code> is primarily for use by developers using <span class="pkg">xts</span> to allow for internal replacement of values removed during use of non xts-aware functions. </p> <h3>Value</h3> <p>Returns either a matrix object for coredata, or a list of named attributes. </p> <p>The replacement functions are called for their side-effects. </p> <h3>Author(s)</h3> <p> Jeffrey A. Ryan </p> <h3>See Also</h3> <p><code><a href="../../zoo/html/zoo.html">coredata</a></code>, <code><a href="xtsAttributes.html">xtsAttributes</a></code> </p> <h3>Examples</h3> <pre> data(sample_matrix) x <- as.xts(sample_matrix, myattr=100) coredata(x) xcoredata(x) </pre> <hr /><div style="text-align: center;">[Package <em>xts</em> version 0.12.2 <a href="00Index.html">Index</a>]</div> </body></html>