title: Why is xts implemented as a matrix rather than a data frame?
body: <p>I've found some information about xts fields representation in <a href="https://stackoverflow.com/questions/4470735/r-converting-data-frame-mixed-factor-and-numeric-to-xts-in-r">this</a> thread but I'm still not clear why xts is an index + a matrix. Why not an index + a data frame?  Wouldn't that allow more flexibility when working with factors and numeric columns?</p>
  
  <p>Once I've loaded data in xts most of the work consists in performing numerical operations on a full set or a subset of the time series. For this the indexing works very well, but I am forced to go through calls like <code>data.frame(data.matrix(myxts))</code> to be able to extract factors and numerical columns.</p>
  
  <p>In addition I find more convenient to use the $ notation than the matrix indexing, although this is really a different question. For example: </p>
  
  <pre><code>lm(myxts$Res ~ myxts$ThisVar + myxts$ThatVar)
  </code></pre>
  
  <p>is easier to write than </p>
  
  <pre><code>lm(myxts[, "Res"] ~ myxts[, "ThisVar"] + myxts[, "ThatVar"]).
  </code></pre>