wordcloudrr: Generate javascript wordcloud

Description Usage Arguments Value Author(s) Examples

Description

A drop-in replacement for wordcloud() to generate javascript wordcloud.

Usage

1
2
3
wordcloudrr(words, freq, scale = c(0.1, 0.01), cols = "#000000",
  shape = "circle", rot_per = 0, dir = NULL, width = 800,
  height = 800, auto_size = TRUE, bgcolor = "#FFFFFF")

Arguments

words

character vector of words to be plotted

freq

numeric vector of word frequency

scale

A vector of length 2 indicating the range of size of words as a ratio of width

cols

character vector of either hex RGB codes or color names in color()

shape

Shape of wordcloud, "circle", "triangle", "star"

rot_per

proportion words with rotation

dir

character, path to export the wordcloud, NULL is temp. dir

width

numeric, width of the wordcloud on canvas

height

numeric, height of the wordcloud on canvas

auto_size

logical, to adjust the size automatically according to scale and width

bgcolor

a hex RGB code or color name for background color

Value

Nothing

Author(s)

Chung-hong Chan <chainsawtiney@gmail.com>, with wordcloud2.js written by timedream and TaffyDB.

Examples

1
2
3
4
5
6
7
## Not run: 
words <- c("hello", 'ngramrr', 'chainsawriot', 'weiborr', 'hkgovrr', 'xx')
freq <- c(150, 80, 50,100, 20, 10)
cols <- c('red', 'violet', 'tomato4', "wheat2", "seagreen", "royalblue")
wordcloudrr(words, freq, colors= col)

## End(Not run)

chainsawriot/wordcloudrr documentation built on May 13, 2019, 3:23 p.m.