title: R tm package invalid input in 'utf8towcs'
body: <p>I'm trying to use the tm package in R to perform some text analysis. I tied the following:</p>
  
  <pre><code>require(tm)
  dataSet &lt;- Corpus(DirSource('tmp/'))
  dataSet &lt;- tm_map(dataSet, tolower)
  Error in FUN(X[[6L]], ...) : invalid input 'RT @noXforU Erneut riesiger (Alt-)�lteppich im Golf von Mexiko (#pics vom Freitag) http://bit.ly/bw1hvU http://bit.ly/9R7JCf #oilspill #bp' in 'utf8towcs'
  </code></pre>
  
  <p>The problem is some characters are not valid. I'd like to exclude the invalid characters from analysis either from within R or before importing the files for processing.</p>
  
  <p>I tried using iconv to convert all files to utf-8 and exclude anything that can't be converted to that as follows:</p>
  
  <pre><code>find . -type f -exec iconv -t utf-8 "{}" -c -o tmpConverted/"{}" \; 
  </code></pre>
  
  <p>as pointed out here <a href="https://stackoverflow.com/questions/4544669/batch-convert-latin-1-files-to-utf-8-using-iconv">Batch convert latin-1 files to utf-8 using iconv</a></p>
  
  <p>But I still get the same error.</p>
  
  <p>I'd appreciate any help.</p>