tmReduce {tm}R Documentation

Combine Transformations

Description

Combine multiple transformations (mappings) into a single one.

Usage

tmReduce(x, tmFuns, ...)

Arguments

x a corpus.
tmFuns a list of tm transformations.
... arguments to the individual transformations.

Value

A single tm transformation function.

Author(s)

Ingo Feinerer

See Also

Use getTransformations to list available transformation (mapping) functions.

Examples

data(crude)
crude[[1]]
skipWords <- function(x, ...) removeWords(x, c("it", "the"))
funs <- list(tmTolower, removePunctuation, skipWords, stripWhitespace)
tmMap(crude, FUN = tmReduce, tmFuns = funs)[[1]]

[Package tm version 0.3-4.1 Index]