stripWhitespace: Strip Whitespace from a Text Document

Description Usage Arguments Value See Also Examples

View source: R/transform.R

Description

Strip extra whitespace from a text document. Multiple whitespace characters are collapsed to a single blank.

Usage

1
2
## S3 method for class 'PlainTextDocument'
stripWhitespace(x, ...)

Arguments

x

A text document.

...

Not used.

Value

The text document with multiple whitespace characters collapsed to a single blank.

See Also

getTransformations to list available transformation (mapping) functions.

Examples

1
2
3
data("crude")
crude[[1]]
stripWhitespace(crude[[1]])

Example output

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

tm documentation built on April 7, 2021, 3:01 a.m.