Learn R Programming

textTools (version 0.1.0)

str_rm_regexp_match: Remove words from a vector that match a regular expression.

Description

Remove words from a vector that match a regular expression.

Usage

str_rm_regexp_match(x, pattern)

Arguments

x

A vector of words.

pattern,

A regular expression.

Value

x, with the words matching the regular expression removed.

Examples

Run this code
# NOT RUN {
str_rm_regexp_match(
x = c("a", "dog", "went", "to", "the", "store"),
pattern = "to"
)
# }

Run the code above in your browser using DataLab