This method returns a vector containing the N words with the highest
estimated parameter values for any of the models estimated in this package.
If topic (and sentiment for the appropriate models) are not specified, the
top N words of every topic will be returned.
Usage
topNwords(x, N, topic = NULL, sentiment = NULL)
# S4 method for JST_reversed.result,numeric,numeric,numeric
topNwords(x, N, topic = NULL, sentiment = NULL)
# S4 method for JST_reversed.result,numeric,ANY,ANY
topNwords(x, N)
# S4 method for JST.result,numeric,numeric,numeric
topNwords(x, N, topic = NULL, sentiment = NULL)
# S4 method for JST.result,numeric,ANY,ANY
topNwords(x, N)
Arguments
x
A results object from any of the models in the package
N
Integer. The number of words to return.
topic
(optional) Integer. The topic to return words from.
sentiment
(optional) Integer. The sentiment to return words from.
Value
If topic and sentiment are specified: A character vector containing
the top N words for the requested topic-sentiment combination. Otherwise a
data.frame containing the top N words for every topic-sentiment combination.