top_words: Show the top words for each topic

View source: R/posterior.R

top_wordsR Documentation

Show the top words for each topic

Description

If show_keyword is TRUE then words in their keyword topics are suffixed with a check mark. Words from another keyword topic are labeled with the name of that category.

Usage

top_words(x, n = 10, measure = c("probability", "lift"), show_keyword = TRUE)

Arguments

x

the output (see keyATM() and by_strata_TopicWord()).

n

integer. The number terms to visualize. Default is 10.

measure

character. The way to sort the terms: probability (default) or lift.

show_keyword

logical. If TRUE, mark keywords. Default is TRUE.

Value

An n x k table of the top n words in each topic


keyATM documentation built on May 31, 2023, 6:27 p.m.