create_topic_model_report: Create Standard Results Report for a Structural Topic Model

Description Usage Arguments

View source: R/create_topic_model_report.R

Description

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.

Usage

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)

Arguments

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 cov_dataset with which to produce a difference plot. If NULL, no plot will be produced.

diff_cov.value1

The first level of diff_cov to be used to create a difference plot.

diff_cov.value2

The second level of diff_cov to be used to create a difference plot.

representative_docs

If TRUE (the default), save full texts of most representative documents. If FALSE, save only a list of titles of the most representative documents.


dtburk/texanaaid documentation built on Nov. 12, 2019, 9:44 p.m.