Description Usage Arguments Value Examples
This method returns a vector containing the 20 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 20 words of every topic will be returned.This method calls the generic topNwords method.
1 2 3 4 5 6 7 8 9 10 11 12 13 | top20words(x, topic = NULL, sentiment = NULL)
## S4 method for signature 'JST_reversed.result,numeric,numeric'
top20words(x, topic = NULL, sentiment = NULL)
## S4 method for signature 'JST_reversed.result,ANY,ANY'
top20words(x)
## S4 method for signature 'JST.result,numeric,numeric'
top20words(x, topic = NULL, sentiment = NULL)
## S4 method for signature 'JST.result,ANY,ANY'
top20words(x)
|
x |
A results object from any of the models in the package |
topic |
(optional) Integer. The topic to return words from. |
sentiment |
(optional) Integer. The sentiment to return words from. |
If topic and sentiment are specified: A character vector containing the top 20 words for the requested topic-sentiment combination. Otherwise a data.frame containing the top 20 words for every topic-sentiment combination.
1 2 | model <- jst(quanteda::dfm(quanteda::data_corpus_inaugural), paradigm())
top20words(model, topic = 1, sentiment = 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.