View source: R/get_top_n_beta_terms.R
get_top_n_beta_terms | R Documentation |
get the top n beta terms for each topic in an stm topic model
get_top_n_beta_terms(td_beta_obj, n = 7)
td_beta_obj |
a tidied beta matrix from the stm topic model of interest. Can be created with topicHelpers::get_td_beta |
n |
the number of top terms to be returned for each topic |
a tbl_df with columns "topic" and "terms"
## Not run:
data("tm_ex_dat")
beta_obj <- get_td_beta(tm_ex_dat$topic_model_test)
get_top_n_beta_terms(beta_obj)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.