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
source
share