dtm.to.Matrix: Transform a tm-style DTM into a sparse Matrix.

Description Usage Arguments Value Examples

View source: R/dtm.to.Matrix.R

Description

Transform a DTM produced by the tm package into a sparse Matrix for use with the glmnet package.

Usage

1

Arguments

dtm

A document term matrix of class 'DocumentTermMatrix'.

Value

A sparse matrix (of class 'Matrix') representation of the DTM.

Examples

1
## Not run: dtm.to.Matrix(dtm)

johnmyleswhite/TextRegression documentation built on May 19, 2019, 5:17 p.m.