Description Usage Arguments Value Examples
This function converts the input character vector into a corpus and applies the clean_corpus function from this package. The resulting corpus is converted into a document term matrix, from which the number of times each term occurs is summed to get the frequency.
1 | get_freq_terms(vec, stopwords = NULL)
|
vec |
character vector to get frequencies from |
stopwords |
optional, adds stopwords to remove from the corpus. If not specified it will only remove English stopwords from the tm package. Argument should be input in the form of a string or character vector. |
Outputs a data frame. Each row represents a word in the character vector with its respective frequency and proportion of times it occured in the vector. Ordered from most to least frequent.
1 | get_freq_terms(words, stopwords = c("remove", "these"))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.