title: Read csv data file in R
body: <p>I am using <code>read.table</code> to read a data file. and got the following error:</p>
  
  <blockquote>
    <p>Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  :<br>
          scan() expected 'a real', got 'true'</p>
  </blockquote>
  
  <p>I know that means there's some error in my data file, the problem is how can I find where is it. The error message did not tell which row has the issue, it's hard for me to find it. Or how can I skip these rows? </p>
  
  <p>Here's my <strong>R</strong> code:</p>
  
  <pre><code>data&lt;-read.csv("/home/jianfezhang/prod/conversion_yaap/data/part-r-00000",
                     sep="\t",
                     col.names=c("site",
                                 "treatment",
                                 "mode",
                                "segment",
                                "source",
                                "itemId",
                                "leaf_categ_id",
                                "condition_id",
                                "auct_type_code",
                                "start_price_lstg_curncy",
                                "bin_price_lstg_curncy",
                                "start_price_variance",
                                "start_price_mean",
                                "start_price_media",
                                "bin_price_variance",
                                "bin_price_mean",
                                "bin_price_media",
                                "is_sold"),
                     colClasses=c(rep("factor",5),"numeric",rep("factor",3),rep("numeric",8),"factor")
                     );
  </code></pre>