plot_candy: Plot Candy Popularity

Description Usage Arguments Value Examples

View source: R/plot_candy.R

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")

benjamin-ackerman/halloween documentation built on Oct. 9, 2019, 6:44 a.m.