doc_topic_matrix: Tidy topic matrices

Description Usage Arguments See Also Examples

Description

Calculate a tidy topic document matrix, document topic matrix. These matrices are often very sparse. These can easily be converted to a real sparse matrix using as.sparseMatrix.

Usage

1
2
3
4
5
6
7

Arguments

state

a tidy_topic_state object.

See Also

as.sparseMatrix

Examples

1
2
3
4
5
6
7
# Load the state of the union topic model
data("sotu50")
dtm <- doc_topic_matrix(sotu50)
tdm <- topic_doc_matrix(sotu50)
ttm <- type_topic_matrix(sotu50)
ttm <- topic_type_matrix(sotu50)
sp_mat <- as.sparseMatrix(x = ttm)

MansMeg/tidytopics documentation built on May 8, 2019, 3:52 p.m.