View source: R/create_topic_model_report.R
Create standard results report for a structural topic model, including FREX and PROB words, topic prevalence plot, topic time trend plots, and most representative documents.
1 2 3 | create_topic_model_report(model, report_dir, cov_dataset, raw_texts,
diff_cov = NULL, diff_cov.value1 = NULL, diff_cov.value2 = NULL,
representative_docs = TRUE)
|
model |
An object of class STM. |
report_dir |
Directory in which to save the report. |
cov_dataset |
A data frame containing any document-level covariates. Must contain a variable named "year". |
raw_texts |
A character vector containing the texts analyzed in the topic model in a human-readable format, to output most representative documents for each topic. |
diff_cov |
The name of a (factor or character) variable in |
diff_cov.value1 |
The first level of |
diff_cov.value2 |
The second level of |
representative_docs |
If |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.