removeWords: Remove Words from a Text Document

View source: R/transform.R

removeWordsR Documentation

Remove Words from a Text Document

Description

Remove words from a text document.

Usage

removeWords(x, ...)
## S3 method for class 'character'
removeWords(x, words, ...)
## S3 method for class 'PlainTextDocument'
removeWords(x, ...)

Arguments

x

A character or text document.

words

A character vector giving the words to be removed.

...

arguments to be passed to or from methods.

Value

The character or text document without the specified words.

See Also

getTransformations to list available transformation (mapping) functions.

remove_stopwords provided by package tau.

Examples

data("crude")
crude[[1]]
removeWords(crude[[1]], stopwords("english"))

tm documentation built on Oct. 1, 2026, 1:06 a.m.