str_counts {textTools} | R Documentation |
Create a list of a vector of unique words found in x and a vector of the counts of each word in x.
str_counts(x)
x |
A vector of words. |
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.
str_counts(
x = c("a", "dog", "went", "to", "the", "store", "and", "a", "dog", "went", "to", "another", "store")
)