MakeWordBar: Create a bar plot of words

Description Usage Arguments Author(s) See Also Examples

Description

Creates a bar plot of words from text that has been initialized to work as text in R.

Usage

1
MakeWordBar(text, min.freq=2, top=50, format = 'count')

Arguments

text

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

min.freq

the minimum frequency of words you want to appear in the bar plot. Default is 2, so only words that appear 2 or more times in your text will be displayed in the bar plot. 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.

...

graphical parameters to be passed to barplot. For example, you could change the color of the bars to blue by passing col="blue", or orient the labels vertically by passing las=2.

Author(s)

Amelia McNamara, James Molyneux

See Also

barplot

Examples

1
2
3
4
data("crude")
MakeWordBar(crude, min.freq=20)
MakeWordBar(crude, top=5)
MakeWordBar(crude, top=5, format='percent')

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