EDS 221 Day 4 AM
Function basics
August 13th, 2026
Information overload?
After three consecutive days of new content, it’s normal to feel overwhelmed.
Your hard work will pay off!
This is your training montage!
Take care of yourself
Learning needs down time. This weekend, take the time for rest and relaxation.
Successful students
Everyone here has what it takes to succeed in this class and in this degree!
The pace can be overwhelming, but you’ll get what you need from this course when you:
Day 3 exit tickets
Muddiest points
A lot of what we are doing with respect to the reef model has not been intuitive to me and I’d really like to develop that intuition.
Not being handheld when it comes to writing code. Simply starting based on verbal instructions is very difficult for me. But we persevere.
Coding it LOL… I understand it conceptually and on paper better.
How do we develop intuition?
Day 3 exit tickets
What I can do as your instructor
Day 3 exit tickets
What you can do as a student
What’s worked for you?
Review day 3
On a sheet of paper, draw a table with 4 rows and 2 columns. Label the columns big_fish and mass.
Trace the loop to right in your table. Each row represents one iteration of the loop and each column represents a variable.
Write down the value each variable will have at end of each loop iteration.
Function definitions
Function definitions have four main parts
The function keyword tells R this is a function definition.
The parameters inside the parentheses declare the function’s inputs.
The body of the function is enclosed in the curly brackets.
The return value comes at the end of the body and defines the function’s output.
Function calls
Function calls invoke function definitions