View source: R/plot_wrdcloud.R
save_wcloud2 | R Documentation |
Saving wordcloud2 object as png
save_wcloud2(graphfile, filename)
graphfile |
wordcloud2 object |
filename |
name for saved file |
png files
## Not run:
library(dataplot)
library(tidytext)
library(tidyr)
library(dplyr)
teks <- dataplot::datatwit
teks <- teks %>%
unnest_tokens(kata, full_text_norm, token = "ngrams", n = 1) %>%
count(kata, sort = TRUE) %>%
head(n = 150)
my_graph <- wordcloud2(teks,
size = 2.3,
minRotation = -pi/0,
maxRotation = -pi/0,
rotateRatio = 1,
color = "grey",
fontFamily = "Roboto")
save_wcloud2(graphfile = my_graph, filename = "coba.png")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.