[R] Wordcloud errors

Bryan Mac Bry@n@M@c @end|ng |rom |p@o@@com
Fri May 22 23:29:29 CEST 2020


Hi all,

I am trying to create word clouds using this script but I am getting warnings.

Script:

      if (runtype=="native") {
        words <- Corpus(VectorSource(test123b[,2]))
        wordcloud(words, min.freq = minfreq, max.words=300, random.order = FALSE ,colors=brewer.pal(9,"Reds")[0:-3])

      }   else {
        wordcloud((as.character(test123[,2])), min.freq = minfreq, max.words=300, random.order = FALSE ,colors=brewer.pal(9,"Reds")[0:-3])

warning messages:
1: in tm_map.simplecorpus(corpus, tm::removepunctuation) : transformation drops documents
2: in tm_map.simplecorpus(corpus, function(x) tm::removewords(x, tm::stopwords())) : transformation drops documents
3: in tm_map.simplecorpus(corpus, tm::removepunctuation) : transformation drops documents
4: in tm_map.simplecorpus(corpus, function(x) tm::removewords(x, tm::stopwords())) : transformation drops documents
5: in tm_map.simplecorpus(corpus, tm::removepunctuation) : transformation drops documents
6: in tm_map.simplecorpus(corpus, function(x) tm::removewords(x, tm::stopwords())) : transformation drops documents


t still produces an output but the warning bugs me. R-help, is there a way to fix this script so that there are no warnings??


Thanks,
Bryan

	[[alternative HTML version deleted]]



More information about the R-help mailing list