View source: R/amzn_ratings_over_time.R
amzn_ratings_over_time | R Documentation |
Graphing star ratings over time. Time frame is either Month or Year. Graph types are either Bar or Line. If using a Line plot, there is an option to include a geom_smooth()
that can be set to either "loess" or "lm".
amzn_ratings_over_time(
data,
time = c("month", "year"),
viz_type = c("bar", "line"),
trend = c("false", "loess", "lm")
)
data |
Data frame created by |
time |
Time frame to aggregate by - either Monthly or Yearly |
viz_type |
Type of graph - either bar graph or line chart |
trend |
Include a trend line in the graph - either "lm" (linear fit) or "loess" (local polynomial fit) |
ggplot2 graphs - either bar or line plots
## Not run:
amzn_ratings_over_time(data, time = "month", viz_type = "line", trend = "lm")
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.