Skip to contents

Plot the most common words in a column of a dataframe.

Usage

top_words_plot(data, column = "word", top_n = 6)

Arguments

data

A data frame containing a column of words

column

A character column containing a list of words

top_n

An integer that specifies how many words you want in the plot

Value

A ggplot2 bar chart of the most common words

Examples

example_words <- data.frame(word_column = c("alfa", "bravo", "charlie", "delta", "alfa"))
top_words_plot(example_words, column = "word_column", top_n = 4)