title: R function read.csv failing with "scan() expected 'a real', got..." message
body: <p>This issue has been raised before and I’ve tried their suggestions, but I think my case is of special interest.  I’ve used read.table, read.csv, and read.csv2.  To no avail.  I choose read.csv2 because the fields/variables are separated with ‘;’, which is the default separator for read.csv2 (albeit you can see I’ve explicitly set it as a workaround)</p>
  
  <p>The first row of the dataset is:</p>
  
  <pre><code>16/12/2006;17:24:00;4.216;0.418;234.840;18.400;0.000;1.000;17.000
  </code></pre>
  
  <p>My read.csv2 is:</p>
  
  <pre><code>foo &lt;- read.csv2(“dataset.txt",sep=";",stringsAsFactors=FALSE,na.strings='NULL',colClasses=c(rep("character",2),rep("numeric",7)))
  </code></pre>
  
  <p>I’m looking to import the date and time values as strings and explicitly coerce them into date and time:</p>
  
  <pre><code>y &lt;- as.Date(foo[,1],"%d/%m/%Y")
  x &lt;- strptime(foo[,2],"%H:%M:%S")
  </code></pre>
  
  <p>My problem is that I cannot get past the read.csv2.  The error is:</p>
  
  <blockquote>
  <pre><code>Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : 
    scan() expected 'a real', got '4.216'
  </code></pre>
  </blockquote>
  
  <p>Here’s what’s cool.  Note the message says “expected 'a real', got '4.216’”.  Folks, 4.216 is a real.  And note 4.216 is indeed the third value of the row.  I’ve also tried:</p>
  
  <pre><code>foo &lt;- read.csv2(“dataset.txt",sep=";",stringsAsFactors=FALSE,na.strings='NULL',colClasses=c(“character”,”character”,rep("numeric",7)))
  </code></pre>
  
  <p>My version of R is  R 3.4.1 GUI 1.70 El Capitan build</p>
  
  <p>Anyone have any ideas of what the problem is?  Or is this just flat out a bug?</p>