Hi, Colleagues.
As shown at the bottom, I was able to obtain information from a column (named
"Message") of a text data (named "SMSSpamCollection" (i.e.,
SMSSpamCollection$Message[44]). But when I ran
SMSSpamCollection.token <-tokens(SMSSpamCollection$Message, what="word",
+ remove_url = TRUE,
+ remove_numbers= TRUE, remove_punct= TRUE,
+ remove_symbols= TRUE, remove_hyphens= TRUE)
The feedback was
Error in tokens.default(SMSSpamCollection$Message, what = "word", remove_url =
TRUE, :
tokens() only works on character, corpus, tokens objects.
I would appreciate some guidance to fix the error message!
Thank you.
JJ
> SMSSpamCollection$Message[44]
[1] Great! I hope you like your man well endowed. I am <#> inches...
3026 Levels: 'An Amazing Quote'' - Sometimes in life its difficult to decide
whats wrong!! a lie that brings a smile or the truth that brings a tear.... ...
[[alternative HTML version deleted]]
______________________________________________
[email protected] mailing list -- To UNSUBSCRIBE and more, see
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.