str_counts: Create a list of a vector of unique words found in x and a...

Description Usage Arguments Value Examples

View source: R/text.table.R

Description

Create a list of a vector of unique words found in x and a vector of the counts of each word in x.

Usage

1

Arguments

x

A vector of words.

Value

A list, position one is a vector of unique and sorted words from x, position two is a vector of the counts for each word.

Examples

1
2
3
str_counts(
x = c("a", "dog", "went", "to", "the", "store", "and", "a", "dog", "went", "to", "another", "store")
)

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