title: Cannot read file with "#" and space using read.table or read.csv in R
body: <p>I have a file where the first row is a header. The header can have spaces and the # symbol (there may be other special characters as well). I am trying to read this file using read.csv or read.table but it keeps throwing me errors:</p>
  
  <pre><code>undefined columns selected 
  
  more columns than column names 
  </code></pre>
  
  <p>My tab-delimited chromFile file looks like:</p>
  
  <pre><code>Chromosome# Chr chr Size    UCSC NCBI36/hg18    NCBIBuild36 NCBIBuild37
  1   Chr1    chr1    247199719   247249719   247249719   249250621
  2   Chr2    chr2    242751149   242951149   242951149   243199373
  </code></pre>
  
  <p>Command:</p>
  
  <pre><code>chromosomes &lt;- read.csv(chromFile, sep="\t",skip =0, header = TRUE,  )
  </code></pre>
  
  <p>I want to first look for a way to read the file as it as without replacing the space or # with some other readable symbol.</p>