title: FUN-error after running 'tolower' while making Twitter wordcloud
body: <p>Trying to create wordcloud from twitter data, but get the following error:</p>
  
  <pre><code>Error in FUN(X[[72L]], ...) : 
    invalid input '������������❤������������ "@xxx:bla, bla, bla... http://t.co/56Fb78aTSC"' in 'utf8towcs' 
  </code></pre>
  
  <p>This error appears after running the     "mytwittersearch_corpus&lt;-
    tm_map(mytwittersearch_corpus, tolower)"  code</p>
  
  <pre><code>mytwittersearch_list &lt;-sapply(mytwittersearch, function(x) x$getText())
  
  mytwittersearch_corpus &lt;-Corpus(VectorSource(mytwittersearch_corpus_list))
  mytwittersearch_corpus&lt;-tm_map(mytwittersearch_corpus, tolower)
  mytwittersearch_corpus&lt;-tm_map( mytwittersearch_corpus, removePunctuation)
  mytwittersearch_corpus &lt;-tm_map(mytwittersearch_corpus, function(x) removeWords(x, stopwords()))
  </code></pre>
  
  <p>I read on other pages this may be due to R having difficulty processing symbols, emoticons and letters in non-English languages, but this appears not to be the problem with the "error tweets" that R has issues with. I did run the codes:</p>
  
  <pre><code>mytwittersearch_corpus &lt;- tm_map(mytwittersearch_corpus, function(x) iconv(enc2utf8(x), sub = "byte"))
  mytwittersearch_corpus&lt;- tm_map(mytwittersearch_corpus, content_transformer(function(x)    iconv(enc2utf8(x), sub = "bytes")))
  </code></pre>
  
  <p>These do not help. I also get that it can't find function <code>content_transformer</code> even though the <code>tm-package</code> is checked off and running.</p>
  
  <p>I'm running this on OS X 10.6.8 and using the latest  RStudio.</p>