View source: R/plot_wordcloud.R
plot_wordcloud | R Documentation |
plot_wordcloud()
plots a word cloud using an output of word_frequency()
.
This function uses wordcloud() to generate word cloud graphics.
plot_wordcloud(
data,
min_freq = 2,
max_words = 100,
random_order = FALSE,
rot_per = 0.35,
colors = NULL,
...
)
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: |
random_order |
(optional) a |
rot_per |
(optional) a number indicating the proportion words with 90
degree rotation (default: |
colors |
(optional) a |
... |
(optional) additional parameters to be passed to the wordcloud() function. |
An invisible NULL
. This function don't aim to return values.
Other Plot functions:
plot_word_frequency()
if (requireNamespace("friends", quietly = TRUE)) {
data <- word_frequency(head(friends::friends[[1]], 100))
suppressMessages(plot_wordcloud(data))
## 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))
suppressMessages(plot_wordcloud(data))
## 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.