Creates a bar plot showing the most frequent words in a document-feature matrix (dfm).
Arguments
- dfm_object
A document-feature matrix created by quanteda::dfm().
- n
The number of top words to display (default: 20).
- height
The height of the resulting Plotly plot, in pixels (default: 800).
- width
The width of the resulting Plotly plot, in pixels (default: 1000).
- ...
Additional arguments passed to plotly::ggplotly().
See also
Other visualization:
apply_standard_plotly_layout(),
create_empty_plot_message(),
create_message_table(),
create_standard_ggplot_theme(),
get_dt_options(),
get_plotly_hover_config(),
get_sentiment_color(),
get_sentiment_colors(),
plot_cluster_terms(),
plot_cross_category_heatmap(),
plot_entity_frequencies(),
plot_mwe_frequency(),
plot_ngram_frequency(),
plot_pos_frequencies(),
plot_semantic_viz(),
plot_similarity_heatmap(),
plot_term_trends_continuous()
Examples
if (interactive()) {
texts <- c("mathematics technology", "education technology", "learning support")
dfm <- quanteda::dfm(quanteda::tokens(texts))
plot <- plot_word_frequency(dfm, n = 5)
print(plot)
}
