| tmReduce {tm} | R Documentation |
Combine multiple transformations (mappings) into a single one.
tmReduce(x, tmFuns, ...)
x |
a corpus. |
tmFuns |
a list of tm transformations. |
... |
arguments to the individual transformations. |
A single tm transformation function.
Ingo Feinerer
Use getTransformations to list available transformation (mapping) functions.
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]]