Create new variables
Grouping and statistical functions
Joining datasets
Summary
14. Exercise 3

Instruction

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

Exercise

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!

Type:

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