words_top_topics | R Documentation |
This function extracts the most salient topics for all words in the topic- word matrix (which must be available).
words_top_topics(m, n, weighting = tw_smooth_normalize(m))
m |
|
n |
number of top topics to extract |
weighting |
a function to transform the topic-word matrix. By default, the topic proportions are used (same rank as raw weights) |
Here as elsewhere "saliency" can be variously defined: the easiest choice is to choose the topic which captures the largest proportion of a word's usage, and that is the default. TODO: actually implement the alternative weighting.
a data frame with three columns, word
, topic
, , and
weight
, the weight used in ranking (topic proportion, by default)
a dataframe with n
rows and two columns, topic
and
weight
.
topic_words
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.