MakeWordCloud: Plot a word cloud

Description Usage Arguments Author(s) See Also Examples

Description

Creates a word cloud from text that has been initialized to work as text in R. Defaults to plotting top 100 most often occuring words.

Usage

1
MakeWordCloud(text, color="BuGn", min.freq=2, top=100, format = 'count')

Arguments

text

a text object that has been initialized using the InitializeText function.

color

a color brewer specification for a color range. Defaults to "BuGn", but other options can be found using the command display.brewer.all(type="seq").

min.freq

the minimum frequency of words you want to appear in the word cloud. Default is 2, so only words that appear 2 or more times in your text will be displayed in the word cloud. You could change this to any other number that you wanted to be the minimum frequency. If you wanted all words that appeared, use 1.

top

an integer greater than 0 for format type 'count' or an integer greater than 0 and less than or equal to 100 for format type 'percent'. Determines the number of words, for 'count', or the percent of words, for 'percent', to plot.

format

must either be specified as 'count' or 'percent'. Use with the 'top' argument to determine how many words to plot.

Author(s)

Amelia McNamara, James Molyneux

See Also

brewer, wordcloud, InitializeText

Examples

1
2
3
4
5
data("crude")
MakeWordCloud(crude, min.freq=15)
MakeWordCloud(crude, top=25)
MakeWordCloud(crude, top = 5, format = 'percent')
MakeWordCloud(crude, min.freq=15, top = 5, format = 'percent')

mobilizingcs/MobilizePrime documentation built on May 23, 2019, 5:07 a.m.