title: Read csv in r with special characters
body: <p>I am trying to read a data file into R with several delimited columns. Some columns have entries which are special characters (such as arrow). Read.table comes back with an error:</p>
  
  <blockquote>
    <p>incomplete final line found by readTableHeader</p>
  </blockquote>
  
  <p>and does not read the file. Tried <code>UTF-8</code>, <code>UTF-16</code> coding options which didn't help either. Here is a small example file.  </p>
  
  <p>I am not able to reproduce the arrow in this question box, hence I am attaching the image of the notepad screen of a small file (<code>test1.txt</code>). 
  Here is what I get when I try to open it.</p>
  
  <pre><code>test &lt;- read.table("test1.TXT", header=T, sep=",", fileEncoding="UTF-8", stringsAsFactor=F)
  </code></pre>
  
  <blockquote>
    <p>Warning message: In read.table("test1.TXT", header = T, sep = ",",
    fileEncoding = "UTF-8",  :   incomplete final line found by
    readTableHeader on 'test1.TXT'</p>
  </blockquote>
  
  <p>However, if I remove the second line (with the special character) and try to import the file, R imports it without problem.  </p>
  
  <pre><code>test2.txt = 
  id, ti, comment
  1001, 105AB, "All OK"
  
  test &lt;- read.table("test2.TXT", header=T, sep=",", fileEncoding="UTF-8", stringsAsFactor=F)
      id     ti comment
  1 1001  105AB  All OK
  </code></pre>
  
  <p>Although this is a small example, the file I am working with is very large. Is there a way I can import the file to R with those special characters in place?</p>
  
  <p>Thank you.</p>
  
  <p><a href="http://i.stack.imgur.com/Hcg7K.png" rel="nofollow">test1.txt</a></p>