EVOLUTION-MANAGER
Edit File: as.environment.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: Coerce an 'xts' Object to an Environment by Column</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.environment.xts {xts}"><tr><td>as.environment.xts {xts}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2> Coerce an ‘xts’ Object to an Environment by Column </h2> <h3>Description</h3> <p>Method to automatically convert an ‘xts’ object to an environment containing vectors representing each column of the original xts object. Each objects will be named according to the column name it is exracted by. </p> <h3>Usage</h3> <pre> ## S3 method for class 'xts' as.environment(x) </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> </table> <h3>Details</h3> <p>An experimental tool to convert <code>xts</code> objects into environments for simplifying use withing the standard R formula/data paradigm. </p> <h3>Value</h3> <p>An <code>environment</code> containing <code>ncol(x)</code> vectors extracted by column from <code>x</code>. Note that environments do not preserve (or have knowledge) of column position, a.k.a order. </p> <h3>Author(s)</h3> <p> Jeffrey A. Ryan </p> <h3>Examples</h3> <pre> x <- xts(1:10, Sys.Date()+1:10) colnames(x) <- "X" y <- xts(1:10, Sys.Date()+1:10) colnames(x) <- "Y" xy <- cbind(x,y) colnames(xy) e <- as.environment(xy) # currently using xts-style positive k ls(xy) ls.str(xy) </pre> <hr /><div style="text-align: center;">[Package <em>xts</em> version 0.12.2 <a href="00Index.html">Index</a>]</div> </body></html>