Learn R Programming

tm (version 0.5-9.1)

foreign: Read Document-Term Matrices

Description

Read document-term matrices stored in special file formats.

Usage

read_dtm_Blei_et_al(file, vocab = NULL)

Arguments

file
a character string with the name of the file to read.
vocab
a character string with the name of a vocabulary file (giving the terms, one per line), or NULL.

Value

  • A document-term matrix.

Details

read_dtm_Blei_et_al reads the (List of Lists type sparse matrix) format employed by the Latent Dirichlet Allocation and Correlated Topic Model C codes by Blei et al (http://www.cs.princeton.edu/~blei).