powered by
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)
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.
# NOT RUN { str_counts( x = c("a", "dog", "went", "to", "the", "store", "and", "a", "dog", "went", "to", "another", "store") ) # }
Run the code above in your browser using DataLab