Learn R Programming

textTools (version 0.1.0)

str_rm_words: Remove words from a vector of words found in another vector of words.

Description

Remove words from a vector of words found in another vector of words.

Usage

str_rm_words(x, y = stopwords)

Arguments

x

A vector of words.

y,

A vector of words to delete from x, defaults to English stop words.

Value

x, with the words found in y removed.

Examples

Run this code
# NOT RUN {
str_rm_words(
x = c("a", "dog", "went", "to", "the", "store"),
y = stopwords
)

str_rm_words(
x = c("a", "dog", "went", "to", "the", "store"),
y = c("dog", "store")
)
# }

Run the code above in your browser using DataLab