Description Usage Arguments Value
View source: R/load_topic_models.R
Returns Gibbs-type LDA models generated using the topicmodels::LDA function. These topic models were generated on the entire legislative dataset from 2001-2019. Because the generation is time-consuming, the individuals models have been saved for ease of reloading. The models take up ~15MB of space each, so they are saved individually. This function permits topics within a specified range to be loaded.
1 | load_topic_models(datadir = NULL, topics = NULL)
|
datadir |
A directory containing topic models in nested dataframe format. If NULL, the inst/extdata and extdata directories are searched in the installation directory. The inst/extdata directory should be explicitly declared to use all files, as only a few models are provided in the installation. |
topics |
An integer, a vector of integers, or named vector in c(to = x, from = y) format. Defaults to first 10. |
A nested dataframe with a column named topic_models for each of the topics specified, along with scores calculated by the ldatuning package.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.