cloud | R Documentation |
Use the wordcloud package to plot a wordcloud for a particular topic
cloud(
stmobj,
topic = NULL,
type = c("model", "documents"),
documents,
thresh = 0.9,
max.words = 100,
...
)
stmobj |
The STM model object to be used in making the word cloud. |
topic |
NULL to plot the marginal distribution of words in the corpus, or a single integer indicating the topic number. |
type |
Specifies how the wordcloud is constructed. The type
|
documents |
The documents object of the same kind as passed to
|
thresh |
The threshold for including a document in the
|
max.words |
The maximum number of words to be plotted. |
... |
Additional parameters passed to |
Uses the wordcloud package to make a word cloud of a particular topic.
The option "model"
uses the topic-word model parameters. Thus it
shows words weighted by their probability conditional that the word comes
from a particular topic. With content covariates it averages over the
values for all levels of the content covariate weighted by the empirical
frequency in the dataset. The option "documents"
plots the words
which appear in documents that have a topic proportion higher than
thresh
. Thus "model"
gives a pure model based interpretation
of the topic while "documents"
gives a picture of all the words in
documents which are highly associated with the topic.
Ian Fellows (2014). wordcloud: Word Clouds. R package version 2.5. https://cran.r-project.org/package=wordcloud
plot.STM
cloud(gadarianFit, 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.