Plot the frequently observed top n terms.
Arguments
- data
A document-feature matrix (dfm) object through the quanteda package.
- n
The number of top n features (terms or words).
- ...
Further arguments passed to
quanteda.textstats::textstat_frequency
.
Value
A ggplot object output from quanteda.textstats::textstat_frequency
and ggplot2::ggplot
.
The result is a ggplot object representing the word frequency plot.
Examples
suppressWarnings({
if(requireNamespace("quanteda")){
dfm <- SpecialEduTech %>%
preprocess_texts(text_field = "abstract") %>%
quanteda::dfm()
dfm %>% plot_word_frequency(n = 20)
}
})