简体   繁体   中英

Wordcloud in R without “tm”

I was trying to use Wordcloud without "tm" package, since it is supported on versions 3.1 and above, but most linux systems have R 3.0.8 installed by default (from the apt repository). So i was thinking to convert a file of words in data.frame to TermDocumentMatrix Object. Please Help. If there is a package to help in 3.0.8, please specify.

In addition to upgrading R (via hrbmstr ) or using the qdap package (via lawyeR ), I would recommend the quanteda package, which depends on the wordcloud package to easily create wordclouds. You could create a wordcloud something like this, where text_vector is a vector of texts (or a column from a matrix or data frame):

library(quanteda)
my_dfm <- dfm(text_vector, ignoredFeatures = stopwords("English"))
plot(my_dfm)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM