| plot_top_words | R Documentation |
Creates a simple plot visualizing word weights in a topic as horizontal bars. The weightiest words appear at the top of the plot.
plot_top_words(frm, topic, n = NULL)
frm |
a data frame of topic top words, from |
topic |
topic number |
n |
number of words to show on plot. If NULL (by default), use all the
words supplied in |
a ggplot object
top_words
## Not run:
top_words(m, n=10) %>%
plot_top_words(m, topic=2)
# or with a different scoring scheme:
top_words (m, n=10, weighting=tw_blei_lafferty(m) %>%
plot_top_words(m, topic=3)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.