how to have fread perform like read.delim <p>I've got a large tab-delimited data table that I am trying to read into R using the data.table package fread function. However, fread encounters an error. If I use read.delim, the table is read in properly, but I can't figure out how to configure fread such that it handles the data properly.</p> <p>In an attempt to find a solution, I've installed the development version of data.table, so I am currently running data.table v1.9.7, under R v3.2.2, running on Ubuntu 15.10.</p> <p>I've isolated the problem to a few lines from my large table, and you can <a href="https://dl.dropboxusercontent.com/u/34644229/problemRows.txt" rel="nofollow">download it here</a>.</p> <p>When I used fread:</p> <pre><code>&gt; fread('problemRows.txt') Error in fread("problemRows.txt") : Expecting 8 cols, but line 3 contains text after processing all cols. It is very likely that this is due to one or more fields having embedded sep=',' and/or (unescaped) '\n' characters within unbalanced unescaped quotes. fread cannot handle such ambiguous cases and those lines may not have been read in as expected. Please read the section on quotes in ?fread. </code></pre> <p>I tried using the parameters used by read.delim:</p> <pre><code>fread('problemRows.txt', sep="\t", quote="\"") </code></pre> <p>but I get the same error.</p> <p>Any thoughts on how to get this to read in properly? I'm not sure what exactly the problem is.</p> <p>Thanks!</p>