Dear Team, 

 

Please suggest on the below error while I am building a WordCloud on R for
one of user twitter account:

 

Error in UseMethod("TermDocumentMatrix", x) : 

  no applicable method for 'TermDocumentMatrix' applied to an object of
class "c('double', 'numeric')"

 

 

I have tried searching a lot on this issue however don't get much help. 

 

Used Tm package and corpus. Below are the expression below:

 

as.character(nwCorp1<- tm_map(corpuss1, removeNumbers))

as.character(nwCorp1<- tm_map(nwCorp1, removePunctuation))

as.character(nwCorp1<- tm_map(nwCorp1,PlainTextDocument))

as.character(nwCorp1<- tm_map(nwCorp1, removeWords,stopwords("english")))

as.character(nwCorp1<- tm_map(nwCorp1,stripWhitespace))

as.character(nwCorp1)

 

dtm11<- DocumentTermMatrix(nwCorp1)

dtm11

dtm12<- as.matrix(dtm11)

dtm12

frequency<- colSums(dtm12)

 

 

Thanks, Shivi

Mb: 9891002021

 

This e-mail is confidential. It may also be legally privileged. If you are not 
the addressee you may not copy, forward, disclose or use any part of it. If you 
have received this message in error, please delete it and all copies from your 
system and notify the sender immediately by return e-mail. Internet 
communications cannot be guaranteed to be timely, secure, error or virus-free. 
The sender does not accept liability for any errors or omissions.
______________________________________________
R-help@r-project.org 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.

Reply via email to