Skip to contents

Draw a collection of documents

Usage

draw_corpus(N, theta, phi)

Arguments

N

Length of documents

theta

Topic distribution for all documents, \(n \times k\) matrix

phi

Word distribution for all topics, \(k \times v\) matrix

Value

Document-term matrix, as a tibble, with columns doc, word, and n

See also

Other generators: journal_specific(), peak_alpha(), rdirichlet()