removeWords: Remove Words from a Text Document

Description Usage Arguments Value See Also Examples

View source: R/transform.R

Description

Remove words from a text document.

Usage

1
2
3
4
## 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.

...

passed over argument words.

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

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

Example output

Loading required package: NLP
<<PlainTextDocument>>
Metadata:  15
Content:  chars: 527
<<PlainTextDocument>>
Metadata:  15
Content:  chars: 452

tm documentation built on June 24, 2018, 3 p.m.