rewards {topChef} | R Documentation |
A dataset containing information about rewards and prizes won by challenge
data(rewards)
This data frame contains the following columns:
season
Name of season
seasonNumber
Season number
series
Top Chef US (listed as US); Top Chef US Masters (listed as US Masters); Top Chef Canada (listed as Canada)
episode
Episode number
challengeType
Challenge type: qualifying challenge, elimination, quickfire, sudden death quickfire, quickfire elimination, battle of the sous chefs
outcomeType
Is the challenge run as a team or as an individual?
rewardType
Variable describing whether the reward is money or a prize
reward
Description of the full reward
chef
Name of chef
https://en.wikipedia.org/wiki/Top_Chef
library(dplyr)
library(tidyr)
rewards %>%
filter(rewardType == "Money") %>%
mutate(reward=as.numeric(reward)) %>%
group_by(season) %>%
summarise(total=sum(reward))