0

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.

rjalfa
  • 729
  • 1
  • 8
  • 14
  • I suggest you read Matt Gemmell's excellent introduction on how to ask for help on technical problems, found here: [whathaveyoutried.com](http://whathaveyoutried.com). I do not intend to be rude, it is actually very good. – Backlin Jan 24 '15 at 14:14
  • Also: [How to make a great reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example) from the SO R FAQ – hrbrmstr Jan 24 '15 at 14:26
  • 2
    Why don't you just upgrade R if there is such a requirement? There's [info](http://cran.r-project.org/bin/linux/) for pretty much every distribution on how to get the latest packages. – hrbrmstr Jan 24 '15 at 14:27
  • 1
    Does the qdap package run on your system, so you can create the tdm you need? Then wordnet can convert it to the matrix object it needs. – lawyeR Jan 24 '15 at 16:41

1 Answers1

0

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)
Community
  • 1
  • 1
Joshua Rosenberg
  • 4,014
  • 9
  • 34
  • 73