View source: R/plot_word_frequency.R
plot_word_frequency | R Documentation |
plot_word_frequency()
plots word frequencies charts related to an output of
word_frequency()
.
plot_word_frequency(
data,
min_freq = 1,
max_words = 10,
dist = FALSE,
color = viridis::viridis(1)
)
data |
A |
min_freq |
(optional) a number indicating the minimum frequency that a
word can have to be plotted (default: |
max_words |
(optional) a number indicating the maximum number of words
to be plotted (default: |
dist |
(optional) a |
color |
(optional) a string with a Hex color code indicating the color
of the data (default: |
An invisible NULL
. This function don't aim to return values.
Other Plot functions:
plot_wordcloud()
if (requireNamespace("friends", quietly = TRUE)) {
data <- word_frequency(head(friends::friends[[1]], 100))
plot_word_frequency(data)
suppressMessages(plot_word_frequency(data, dist = TRUE))
## Note that graphics rendered in the documentation may
## not represent the quality of the output.
}
if (requireNamespace("stringi", quietly = TRUE)) {
data <- word_frequency(stringi::stri_rand_lipsum(5))
plot_word_frequency(data)
suppressMessages(plot_word_frequency(data, dist = TRUE))
## Note that graphics rendered in the documentation may
## not represent the quality of the output.
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.