title: Reading Tab Delimited Data in to R
body: <p>I am trying to read a large tab delimited file in to R.</p>
  
  <p>First I tried this:</p>
  
  <pre><code>data &lt;- read.table("data.csv", sep="\t")
  </code></pre>
  
  <p>But it is reading some of the numeric variables in as factors</p>
  
  <p>So I tried to read in the data based on what type I want each variable to be like this:</p>
  
  <pre><code>data &lt;- read.table("data.csv", sep="\t", colClasses=c("character","numeric","numeric","character","boolean","numeric"))
  </code></pre>
  
  <p>But when I try this it gives me an error:</p>
  
  <blockquote>
    <p>Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings,  : 
      scan() expected 'a real', got '"4"'</p>
  </blockquote>
  
  <p>I think it might be that there are quotes around some of the numeric values in the original raw file, but I'm not sure. </p>