Rainbow Deals - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Creating functions
If statements
16. Calling the above_average() function
Summary

Instruction

Great! You successfully created the above_average() function. Now let's check that it works!

Exercise

Does Magnolia Liley have a salary above or below the average value of survey$salary?

Remember, the function above_average() takes two arguments: the value and the vector.

Stuck? Here's a hint!

Type:

above_average(survey[survey$name == "Magnolia" & survey$lastname == "Liley", ]$salary, survey$salary)