powered by
Takes topics by terms matrix and returns top M terms for each topic
GetTopTerms(phi, M)
A matrix whose rows index topics and columns index words
An integer for the number of terms to return
Returns a data.frame whose columns correspond to a topic and whose m-th row correspond to the m-th top term from the input phi.
data.frame
phi
# NOT RUN { # Load a pre-formatted dtm and topic model data(nih_sample_topic_model) top_terms <- GetTopTerms(phi = nih_sample_topic_model$phi, M = 5) str(top_terms) # }
Run the code above in your browser using DataLab