Description Usage Arguments Value See Also Examples
Estimate a CTM topic model.
1 |
pooled_dfm |
Object of class dfm (see dfm) containing (pooled) Tweets. |
n_topics |
Integer with number of topics |
... |
Additional arguments passed to stm. |
Object of class stm
stm
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | ## Not run:
library(Twitmo)
# load tweets (included in package)
mytweets <- load_tweets(system.file("extdata", "tweets_20191027-141233.json", package = "Twitmo"))
# Pool tweets into longer pseudo-documents
pool <- pool_tweets(data = mytweets)
pooled_dfm <- pool$document_term_matrix
# fit your CTM with 7 topics
ctm_model <- fit_ctm(pooled_dfm, n_topics =7)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.