Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

removeNumbers

Remove Numbers from a Text Document


Description

Remove numbers from a text document.

Usage

## S3 method for class 'character'
removeNumbers(x, ucp = FALSE, ...)
## S3 method for class 'PlainTextDocument'
removeNumbers(x, ...)

Arguments

x

a character vector or text document.

ucp

a logical specifying whether to use Unicode character properties for determining digit characters. If FALSE (default), characters in the ASCII [:digit:] class (i.e., the decimal digits from 0 to 9) are taken; if TRUE, the characters with Unicode general category Nd (Decimal_Number).

...

arguments to be passed to or from methods; in particular, from the PlainTextDocument method to the character method.

Value

The text document without numbers.

See Also

getTransformations to list available transformation (mapping) functions.

Examples

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

tm

Text Mining Package

v0.7-8
GPL-3
Authors
Ingo Feinerer [aut, cre] (<https://orcid.org/0000-0001-7656-8338>), Kurt Hornik [aut] (<https://orcid.org/0000-0003-4198-9911>), Artifex Software, Inc. [ctb, cph] (pdf_info.ps taken from GPL Ghostscript)
Initial release
2020-11-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.