str_count_intersect {textTools}R Documentation

Count the intersecting words in a vector that are found in another vector (only counts unique words).

Description

Count the intersecting words in a vector that are found in another vector (only counts unique words).

Usage

str_count_intersect(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 also in y

Examples

str_count_intersect(
x = c("a", "dog", "went", "to", "the", "store"),
y = c("dog", "to", "store")
)

[Package textTools version 0.1.0 Index]