On Jan 10, 2014, at 10:11 AM, ramoss wrote:

Hi,

I am trying to use the package TM on a dataframe & get the following error:

complaints <- tm_map(complaints, tolower)
Error in UseMethod("tm_map", x) :
 no applicable method for 'tm_map' applied to an object of class
"data.frame"

Tm doesn't work on dataframes? My data frame consists of 1 text variable containing customer complaints. What do I have to change it to in order to
use the TM package for text mining?

Thanks ahead for your help/thoughts.

As the Posting Guide says: Sometimes the appropriate answer is to direct you to the "manual". In this case ?tm::tm_map shows that the first argument is expected to be a corpus object.

--

David Winsemius, MD
Alameda, CA, USA

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to