Search code examples
rtmword-cloud

Wordcloud on dataframe in R


Being new to R, I am lacking a few basics. Is it possible to make a wordcloud on a dataframe? my data is like:

X  x
a  10
b  8
c  6
d  4

Can i make a workcloud on the above data where X is the word and x is its frequency?


Solution

  • You can. Just specify wordcloud(words = data$X, freq = data$x)

    Be aware that by default the minimum frequency is set to 3. You might want to adjust this. just check the help.