create_dtm: Create a document term matrix from a token list

Description Usage Arguments Value

View source: R/frog.r

Description

Create a document term matrix from a token list

Usage

1
create_dtm(docs, terms, freqs = rep(1, length(terms)), weighting = weightTf)

Arguments

docs:

a vector that identifies to which document a token belongs

terms:

a vector of terms of length equal to docs

freqs:

an optional vector giving the frequency of each term

weighting:

the optional weighting for tm (default: term frequency)

Value

an object of type DocumentTermMatrix (from the tm package)


vanatteveldt/frogr documentation built on May 3, 2019, 2:59 p.m.