Error in text mining: no applicable method for '***' applied to an object of class "character"
Post date: Aug 17, 2014 11:12:51 PM
Q: When trying the code in chapter text mining, some readers came across an error:
no applicable method for '***' applied to an object of class "character".
A: It is caused by the changes in package tm v0.6 from tm v0.5-10. Some functions need to be wrapped with "content_transformer", which is new in tm v0.6. See solutions at http://www.rdatamining.com/docs/RDataMining-slides-text-mining.pdf.
Another way is to use tm v0.5-10, based on which all original code can run successfully without any changes. Package tm v0.5-10 can be installed with code below.
install.packages("http://cran.r-project.org/bin/windows/contrib/3.0/tm_0.5-10.zip")