Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Create new variables
Grouping and statistical functions
Joining datasets
14. Exercise 3


Math isn't the only important subject. Let's see which students are getting passing grade on their exams.


In students, create a new column named pass_fail with a value of "pass" if the value in the result column is greater or equal to 60 and a value of "fail" otherwise. Use mutate() and if_else().

Again, overwrite the students variable.

Stuck? Here's a hint!


students <- students %>%
  mutate(pass_fail = if_else(result >= 60, "pass", "fail"))