title: R - How to Read in a .fwf that contains a # sign
body: <p>I am attempting to read in a large fixed width file into R using read.fwf, but I keep getting the error "Error in scan(file = file, what = what, sep = sep, quote = quote, dec = dec,  : line 47 did not have 41 elements".  My dataset has 41 columns but when I read in line 48 alone I only get 27 columns.  I noticed that the error takes place when it encounters a # sign.  How can I either remove the # sign or force read.fwf to ignore it.  Here is a little of my code, but since the dataset is massive I am not going to provide it.</p>
  
  <pre><code>df &lt;- read.fwf("flat404.DALLASCOUNTY.20161030.412476", widths = width2, col.names = fields)
  </code></pre>
  
  <p>Thanks for any help.</p>