Description Usage Arguments Value
View source: R/load_lawmaker_models.R
Returns nested data frames containing the dot product of a sparse sponsorship matrix and the Gibbs-type LDA models generated using the topicmodels::LDA function. These 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 > 50 MB of space in the aggregate, so they are saved individually. This function permits topics within a specified range to be loaded. #'
1 | load_lawmaker_models(datadir = NULL, topics = NULL)
|
datadir |
A directory containing lawmaker 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 or a vector of integers. Defaults to first 10. |
A nested dataframe with a column named lawmaker_models for each of the topics specified.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.