title: can I write an xts object using write.csv in R
body: <p>I have an xts object, the first column of which is date-time, followed by OHLC. when I type </p>
  
  <pre><code>&gt;test
  </code></pre>
  
  <p>it prints the correct output as follows:</p>
  
  <pre><code>2010-09-08 15:13:00   115   115  110    115
  2010-09-08 15:14:00   120   125  115    125
  </code></pre>
  
  <p>however, when I try write.csv(test,"test.csv")
  it only writes the OHLC - why. what command do I use to also write the date-time</p>
  
  <p>this is what str(test) looks like:</p>
  
  <pre><code>An ‘xts’ object from 2010-06-30 15:47:00 to 2010-09-08 15:14:00 containing:
    Data: num [1:21757, 1:4] 215 220 205 195 185 ...
   - attr(*, "dimnames")=List of 2
    ..$ : NULL
    ..$ : chr [1:4] "y.Open" "y.High" "y.Low" "y.Close"
    Indexed by objects of class: [POSIXlt,POSIXt] TZ: 
    xts Attributes:  
   NULL
  </code></pre>