title: How to read quoted text containing escaped quotes
body: <p>Consider the following comma separated file. For simplicity let it contain one line:</p>
  
  <hr>
  
  <pre><code>'I am quoted','so, can use comma inside - it is not separator here','but can\'t use escaped quote :=('
  </code></pre>
  
  <hr>
  
  <p>If you try to read it with the command</p>
  
  <pre><code>table &lt;- read.csv(filename, header=FALSE)
  </code></pre>
  
  <p>the line will be separated to 4 parts, because line contains 3 commas. In fact I want to read only 3 parts, one of which contains comma itself. There quote flag comes for help. I tried:</p>
  
  <pre><code>table &lt;- read.csv(filename, header=FALSE, quote="'")
  </code></pre>
  
  <p>but that falls with error <code>"incomplete final line found by readTableHeader on table"</code>. That happens because of odd (seven) number of quotes.</p>
  
  <p><code>read.table()</code> as well as <code>scan()</code> have parameter <code>allowEscapes</code>, but setting it to <code>TRUE</code> doesn't help. It is ok, cause from <code>help(scan)</code> you can read:</p>
  
  <blockquote>
    <p>The escapes which are interpreted are the control characters
              ‘\a, \b, \f, \n, \r, \t, \v’, ...
      ... Any other escaped
              character is treated as itself, including backslash</p>
  </blockquote>
  
  <p>Please suggest how would you read such quoted csv-files, containing escaped <code>\'</code> quotes.</p>