Wordcloud errors

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Wordcloud errors

Bryan Mac
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]]

______________________________________________
[hidden email] 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.