Wordcloud package: get "Error in strwidth (...): invalid value" cex "

I use tm and wordcloud packages in R 2.15.1. I am trying to make a word cloud from DTM. Here is the code:

library(wordcloud)
thedtmsparse = inspect(sparse)
trymatrix = t(thedtmsparse)
colnames(trymatrix) = c()
comparison.cloud(trymatrix, max.words=15, random.order=FALSE)

I get the following error from the last command:

Error in strwidth(words[i], cex = size[i], ...) : invalid 'cex' value

I used the same code on another DTM, where it worked fine, and I got the word cloud. Can someone tell me to fix the error?

Ravi

+5
source share
1 answer

You did not provide reproducible code (probably the big reason that no one answered your question), so I can only guess what the problem is.

, . , NA 0. , .

+5

All Articles