amzn_frequent_terms: Most Frequent Terms by Star Rating

View source: R/amzn_frequent_terms.R

amzn_frequent_termsR Documentation

Most Frequent Terms by Star Rating

Description

Function to calculate the top terms for each star rating.

Usage

amzn_frequent_terms(data, count)

Arguments

data

Data frame created by GSPtext::get_reviews() or in the same format

count

Number of terms to return per star rating

Value

Returns a list with two items - item 1 ($data) is the data frame with top terms for each star rating; item 2 ($graph) is a ggplot bar graph faceted by star rating

Examples

## Not run: 
out <- amzn_frequent_terms(data, 15)
# to access data
top_terms <- out$data

# to call the graph
out$graph

## End(Not run)

taylorgrant/GSPtext documentation built on April 15, 2023, 10:56 p.m.