EVOLUTION-MANAGER
Edit File: dimnames.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: Dimnames 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 dimnames.xts {xts}"><tr><td>dimnames.xts {xts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Dimnames of an xts Object </h2> <h3>Description</h3> <p>Get or set dimnames of an xts object. </p> <h3>Usage</h3> <pre> ## S3 method for class 'xts' dimnames(x) ## S3 replacement method for class 'xts' dimnames(x) <- value </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x</code></td> <td> <p> an xts object </p> </td></tr> <tr valign="top"><td><code>value</code></td> <td> <p> a list object of length two. See Details. </p> </td></tr> </table> <h3>Details</h3> <p>The functions <code>dimnames.xts</code> and <code>dimnames<-.xts</code> are methods for the base functions <code>dimnames</code> and <code>dimnames<-</code>. </p> <p><code>xts</code> objects by design are intended for lightweight management of time-indexed data. </p> <p>Rownames are redundant in this design, as well as quite burdensome with respect to memory consumption and internal copying costs. </p> <p><code>rownames</code> and <code>colnames</code> in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> make use of <code>dimnames</code> method dispatch internally, and thus require only modifications to dimnames to enforce the <code>xts</code> no rownames requirement. </p> <p>To prevent accidental setting of rownames, <code>dimnames<-</code> for <code>xts</code> will simply set the rownames to <code>NULL</code> when invoked, regardless of attempts to set otherwise. </p> <p>This is done for internal compatibility reasons, as well as to provide consistency in performance regardless of object use. </p> <p>User level interaction with either dimnames or rownames will produce a character vector of the index, formatted based on the current specification of <code>indexFormat</code>. This occurs within the call by converting the results of calling <code>index(x)</code> to a character string, which itself first creates the object type specified internally from the underlying numeric time representation. </p> <h3>Value</h3> <p>A list or character string containing coerced row names and/or actual column names. </p> <p>Attempts to set rownames on xts objects via rownames or dimnames will silently fail. This is your warning. </p> <h3>Note</h3> <p>All <code>xts</code> objects have dimension. There are no <code>xts</code> objects representable as named or unnamed vectors. </p> <h3>Author(s)</h3> <p> Jeffrey A. Ryan </p> <h3>See Also</h3> <p><code><a href="xts.html">xts</a></code> </p> <h3>Examples</h3> <pre> x <- xts(1:10, Sys.Date()+1:10) dimnames(x) rownames(x) rownames(x) <- 1:10 rownames(x) str(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>