replacePatterns-methods {tm}R Documentation

Methods for Function replacePatterns in Package ‘tm’

Description

Methods for function replacePatterns in package tm.

Methods

object = "PlainTextDocument", patterns = "character", by = "character"
Replaces all patterns (in POSIX 1003.2 extended regular expressions format, as used by gsub) which occur in object with by and return the object.

See Also

Use getTransformations to list available transformation (mapping) functions.

Examples

data("crude")
crude[[1]]
replacePatterns(crude[[1]], "[[:space:]]((C|c)orp|copany)[[:space:]]", " company ")

[Package tm version 0.3-3 Index]