In our Introduction to R course, we already talked about the basics of functions. In this part, we'll learn a lot more about functions and write plenty of our own!
A function is a set of reusable instructions that can be called in a script as many times as needed. In Introduction to R, we looked at several built-in functions. We mentioned the
list() function, which we use to create lists. You also worked with the
data.frame() function, which is used to create data frames. We've also looked at the
In this part of the course, we'll learn how to create our own functions and use them in our R code. We'll be working with a dataset of people surveyed from the fictional country of Jesse. This data includes each person's:
- First name
- Last name
- Answers to job-related questions