Suppress reader parse problems in r : <p>I am currently reading in a file using the package <code>readr</code>. The idea is to use <code>read_delim</code> to read in row for row to find the maximum columns in my unstructured data file. The code outputs that there are <code>parsing</code> problems. I know of these and will deal with column type after import. Is there a way to turn off the <code>problems()</code> as the usual <code>options(warn)</code> is not working</p>

<pre><code>i=1
max_col &lt;- 0
options(warn = -1)
while(i != "stop")
{
  n_col&lt;- ncol(read_delim("file.txt", n_max = 1, skip = i, delim="\t"))
  if(n_col &gt; max_col) {
    max_col &lt;- n_col
    print(max_col)
  }
  i &lt;- i+1
  if(n_col==0) i&lt;-"stop"
}
options(warn = 0) 
</code></pre>

<p>The output to console that I am trying to suppress is the following:</p>

<pre><code>.See problems(...) for more details.
Warning: 11 parsing failures.
row      col   expected  actual
  1 1####4 valid date 1###8
</code></pre>
