Transforms a wfm to the format used by the lda package

wfm2lda(wfm, dir = NULL, names = c("mult.dat", "vocab.dat"))

Arguments

wfm

a word frequency matrix

dir

a file to dump the converted data

names

Names of the data and vocabulary file respectively

Value

A list containing

data

zero indexed word frequency information about a set of documents

vocab

a vocabulary list

, unless dir is specified. If dir is specified then the same information is dumped to 'vocab.dat' and 'mult.dat' in the dir folder.

Details

See the documentation of lda package for the relevant object structures and file formats.

See also

Author

Will Lowe