str_count_nomatch: Count the words in a vector that are not found in another...

Description Usage Arguments Value Examples

View source: R/text.table.R

Description

Count the words in a vector that are not found in another vector.

Usage

1
str_count_nomatch(x, y, ratio = FALSE)

Arguments

x

A vector of words.

y

A vector of words to test against.

ratio

TRUE/FALSE, if TRUE, returns the number of words in x without a match in y divided by the number of words in x.

Value

A number, the count of words in x and not in y

Examples

1
2
3
4
5
6
7
8
9
str_count_nomatch(
x = c("a", "dog", "went", "to", "the", "store"),
y = c("dog", "to", "store")
)
str_count_nomatch(
x = c("a", "dog", "went", "to", "the", "store"),
y = c("dog", "store"),
ratio = TRUE
)

textTools documentation built on Feb. 5, 2021, 5:07 p.m.