title: read_csv() parsing error message, how to interpret?
body: <p>I am in the middle of parsing in a large amount of csv data. The data is rather "dirty" in that I have inconsistent delimiters, spurious characters and format issues that cause problems for <strong>read_csv()</strong>.</p>
  
  <p>My problem here, however, is not the dirtiness of the data, but just trying to understand the parsing errors that <strong>read_csv()</strong> is giving me. If I can better understand the error messages, I can then do some janitorial work to fix the problem with scripts. <em>The size of the data makes a manual approach intractable.</em></p>
  
  <p>Here's a minimal example. Suppose I have a csv file like this:</p>
  
  <pre><code>"col_a","col_b","col_c"
  "1","a quick","10"
  "2","a quick "brown" fox","20"
  "3","quick, brown fox","30"
  </code></pre>
  
  <p>Note that there's spurious quotes around "brown" in the 2nd row. This content goes into a file called "<strong>my_data.csv</strong>".</p>
  
  <p>When I try to read that file, I get some parsing failures.</p>
  
  <pre><code>&gt; library(tidyverse)
  &gt; df &lt;- read_csv("./my_data.csv", col_types = cols(.default = "c"))
  Warning: 2 parsing failures.
  row # A tibble: 2 x 5 col     row   col           expected actual            file expected   &lt;int&gt; &lt;chr&gt;              &lt;chr&gt;  &lt;chr&gt;           &lt;chr&gt; actual 1     2 col_b delimiter or quote      b './my_data.csv' file 2     2 col_b delimiter or quote        './my_data.csv'
  </code></pre>
  
  <p>As you can see, the parsing failure has not been "pretty printed". It is ONE LONG LINE of 271 characters.</p>
  
  <p>I can't figure out where to even put linebreaks in the failure message to see where the problem is and what the message is trying to tell me. Moreover, it refers to a "2x5 tibble". What tibble? My data frame is 3x3.</p>
  
  <p>Can someone show me how to format or put linebreaks in the message from <strong>read_csv()</strong> so I can see how it is detecting the problem?</p>
  
  <p>Yes, I know what the problem is in this particular minimal example. In my actual data I am dealing with large amounts of csv (~1M rows), peppered with inconsistencies that shower me with hundreds of parsing failures. I'd like to setup a workflow for categorizing these and dealing with them programmatically. The first step, I think, is just understanding how to "parse" the parsing failure message.</p>