topicmodels (version 0.2-16)

terms_and_topics: Extract most likely terms or topics.

Description

Function to extract the most likely terms for each topic or the most likely topics for each document.

Usage

# S4 method for TopicModel
terms(x, k, threshold, ...)
# S4 method for TopicModel
topics(x, k, threshold, ...)

Value

A list or matrix containing the most likely terms for each topic or the most likely topics for each document.

Arguments

x

Object of class "TopicModel".

k

The maximum number of terms/topics returned. By default set to 1 if no threshold is given.

threshold

Only the terms/topics which are more likely than the threshold are returned.

...

Further arguments passed to sapply.

Author

Bettina Gruen

See Also

posterior-methods