removeSparseTerms-methods {tm}R Documentation

Methods for Function removeSparseTerms in Package ‘tm’

Description

Methods for function removeSparseTerms in package tm.

Methods

object = "TermDocMatrix", sparse = "numeric"
Return object where those columns (i.e., terms) from Data(object) are removed which have at least a sparse percentage of empty (i.e., terms occurring 0 times in a document) elements. I.e., the resulting matrix contains only columns with a sparse factor of less than sparse.

Examples

data("crude")
tdm <- TermDocMatrix(crude)
removeSparseTerms(tdm, 0.2)

[Package tm version 0.3-3 Index]