natu
February 8, 2020, 5:09pm
1
I'm getting error when I try to clean some data.
These are my codes and when i run last line it gives warning message.
#Cleaning Tweets with Text-mining
install.packages("tm")
library(tm)
mycorpus <- Corpus(VectorSource(trump$text))
mycorpus <- tm_map(mycorpus, removeWords, stopwords())
Warning message: "In tm_map.SimpleCorpus(mycorpus, removeWords, stopwords()) :
transformation drops documents"
Please provide me some solution.
Thanks!
That warning message is normal because you are removing stop words, the logical thing to expect is to lose documents.
Can you explain what is your issue with this or what would be the expected behavior?
1 Like
try this ?
if it doesnt work I'll need to know more about 'trump$text"
install.packages("tm")
library(tm)
mycorpus <- VCorpus(x = VectorSource(trump$text),
readerControl = list(reader=readPlain,
language="en"))
mycorpus <- tm_map(mycorpus, removeWords, stopwords())
1 Like
natu
February 8, 2020, 8:33pm
4
Thank you so much! your codes actually worked.
system
Closed
February 15, 2020, 8:33pm
5
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.