update:
Thanks for help. Check comments. Because of package version, I delete the tolower and it works. I just need to find another way to make it lower.
==
This problem appears in tm 0.6 and has to do with using functions that are not in the list of getTransformation()
from tm. The problem is that tolower
just returns a character vector, and not a "PlainTextDocument" like tm_map
would like. The tm
packages provides the content_transformer
function to take care of managing the PlainTextDocument
fbCorpus <- tm_map(fbCorpus, content_transformer(tolower))