stripWhitespace: Strip Whitespace from a Text Document

View source: R/transform.R

stripWhitespaceR Documentation

Strip Whitespace from a Text Document

Description

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

Usage

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

Arguments

x

A text document.

...

arguments to be passed to or from methods. Currently 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

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

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