Compute the term frequencies for the dtm and plot a word cloud with the top n topics You can either supply a document-term matrix or provide terms and freqs directly (in which case this is an alias for wordcloud::wordcloud with sensible defaults)
1 2 3 |
dtm |
the document-term matrix |
nterms |
the amount of words to plot (default 100) |
freq.fun |
if given, will be applied to the frequenies (e.g. sqrt) |
terms |
the terms to plot, ignored if dtm is given |
freqs |
the frequencies to plot, ignored if dtm is given |
scale |
the scale to plot (see wordcloud::wordcloud) |
min.freq |
the minimum frquency to include (see wordcloud::wordcloud) |
rot.per |
the percentage of vertical words (see wordcloud::wordcloud) |
pal |
the colour model, see RColorBrewer |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.