Learn R Programming

textTools (version 0.1.0)

str_count_setdiff: Count the words in a vector that don't intersect with another vector (only counts unique words).

Description

Count the words in a vector that don't intersect with another vector (only counts unique words).

Usage

str_count_setdiff(x, y)

Arguments

x

A vector of words.

y

A vector of words to test against.

Value

A number, the count of unique words in x not also in y

Examples

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

Run the code above in your browser using DataLab