View source: R/plot_wordcloud.R
plot_wordcloud | R Documentation |
Make a custom wordcloud plot.
plot_wordcloud( x, output = "./wordcloud.png", scale = c(4, 0.5), width = 12, height = 7, units = "in", res = 150, fixed.asp = FALSE, removePunctuation = TRUE, removeNumbers = TRUE, stripWhitespace = TRUE, colors = brand_cols() )
x |
Vector of sentences or words. |
output |
Output path. |
scale |
A vector of length 2 indicating the range of the size of the words. |
res |
The nominal resolution in ppi which will be recorded in the bitmap file, if a positive integer. Also used for units other than the default. If not specified, taken as 72 ppi to set the size of text and line widths. |
fixed.asp |
if TRUE, the aspect ratio is fixed. Variable aspect ratio only supported if rot.per==0 |
removePunctuation |
Remove punctuation. Default: TRUE. |
removeNumbers |
Remove numbers. Default: TRUE. |
stripWhitespace |
Remove whitespace. Default: TRUE. |
colors |
Colors to use in wordcloud. |
# Create a vector of month names x <- c() for (i in 1:12) { x <- append(x, rep(month.name[i], i * 2)) } plot_wordcloud(x, "./wordcloud.png")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.