plot_candy: Plot Candy Popularity

Description Usage Arguments Value Examples

Description

This function produces a bar plot of the most popular Halloween candies

Usage

1
plot_candy(df, n = 10, candy_name_col, rank_col)

Arguments

df

a dataframe containing information on the candies

n

the number of top candies to plot. Default is set at 10

candy_name_col

the name of the column in df that specifies the names of the candies

rank_col

the name of the column in df that specifies how to rank the candies

Value

a ggplot object

Examples

1
plot_candy(candy_data, candy_name_col = "competitorname", rank_col = "winpercent")

PeijinV5/Halloween documentation built on May 8, 2019, 12:53 p.m.