MakeWordcloud: Function to make a wordcloud

Description Usage Arguments Value Examples

View source: R/WordCloud.R

Description

Function to make a wordcloud

Usage

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), ...)

Arguments

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()

Value

wordcloud

Examples

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()

srvanderplas/nppd documentation built on May 30, 2019, 8:42 a.m.