{
# How many singers have been on the show?
sum(grepl("singer", contestants$famous_for, ignore.case = TRUE))
# Who has the worst overall trial performance across all seasons?
contestants[
which.min(contestants$trial_performance),
c("first_name", "last_name", "trials_attempted", "trial_performance")
]
}
Run the code above in your browser using DataLab