Description Usage Arguments Value Examples
Function to make a wordcloud
1 2 3 | MakeWordcloud(x, color.set = RColorBrewer::brewer.pal(6, "Dark2"),
colors = color.set, max.words = 50, rot.per = 0.3, random.order = F,
random.color = T, scale = c(4, 0.5), ...)
|
x |
word frequency data frame (from MakeWordFreq), with columns "word" and "freq" |
color.set |
vector of colors |
max.words |
maximum words |
rot.per |
percentage of words to rotate |
random.order |
plot words in random order? |
random.color |
color words randomly? |
... |
arguments to wordcloud() |
wordcloud
1 2 3 | data(compilerOutput, package = "nppd")
compiler.output %>% str_replace_all("[[^[A-z] _]\\\\`]", " ") %>% str_split(" ") %>% unlist %>% str_trim() %>% table() %>% as.data.frame(stringsAsFactors = FALSE) %>% set_names(c("word", "freq")) %>% filter(nchar(word) > 0) -> tmp
tmp %>% MakeWordcloud()
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.