plot_wordcloud: Plots a wordcloud for the given petitions.

Description Usage Arguments Value Examples

Description

Shamelessly taken from example code in http://onertipaday.blogspot.com/2011/07/word-cloud-in-r.html

Usage

1
2
  plot_wordcloud(petitions, column,
    colors = brewer.pal(8, "Dark2"), scale = c(8, 0.2))

Arguments

petitions

a data frame of petitions

column

which column from the petitions to use for the word cloud (e.g. 'body', 'title')

colors

the colors to use for the words

scale

the scale to use for the wordcloud plot

Value

plot of the wordcloud for all petitions

Examples

1
2
3
data(petitions)
one_petition <- head(petitions, n=1)
print(plot_wordcloud(one_petition, 'body'))

yoni/r_we_the_people documentation built on May 4, 2019, 5:31 p.m.