title: Read xts from CSV file in R
body: <p>I'm trying to read time series from CSV file and save them as xts to be able to process them with quantmod. The problem is that numeric values are not parsed.</p>
  
  <p>CSV file:</p>
  
  <pre><code>name;amount;datetime
  test1;3;2010-09-23 19:00:00.057
  test2;9;2010-09-23 19:00:00.073
  </code></pre>
  
  <p>R code:</p>
  
  <pre><code>library(xts)
  ColClasses = c("character", "numeric", "character")
  Data &lt;- read.zoo("c:\\dat\\test2.csv", index.column = 3, sep = ";", header = TRUE, FUN = as.POSIXct, colClasses = ColClasses)
  as.xts(Data)
  </code></pre>
  
  <p>Result:</p>
  
  <pre><code>                    name    amount
  2010-09-23 19:00:00 "test1" "3"   
  2010-09-23 19:00:00 "test2" "9"   
  </code></pre>
  
  <p>See amount column contains character data but expected to be numeric. What's wrong with my code?</p>