Learn R Programming

textanalyzer (version 0.2.0)

plot_ngrams: Plot Ngrams

Description

Plot ngrams - Word(s) vs. Count.

Usage

plot_ngrams(ngrams_data, top_rows = 25, plot_nrows = 25)

Value

A ggplot plot object of bar chart with words and their counts.

Arguments

ngrams_data

a data.frame containing word and n columns.

top_rows

a numeric vector of length 1. Number of top rows to be returned.

plot_nrows

a numeric vector of length 1. Number of rows to be plotted.

Author

Ravindra Pushker

Details

plot_ngrams

Examples

Run this code
plot_ngrams(data.frame(word=c("test1", "test2"), n=c(25, 30)))

Run the code above in your browser using DataLab