Week 8
Functions and lists
Topics
Part 8:
- Learn how to write and use custom functions
- Learn about lists as a general purpose data structure
- Learn and utilize list properties
- Access list elements using
$and[[]] - Understand the difference between homogeneous and heterogeneous lists
- Use
purrr::pluck()to access list elements - Understand how
data.frames()are list-like
Announcements
- Functions of the Week
- Signup sheet for your functions of the week presentations. The file is in OneDrive in the functions_of_the_week folder.
- Presentations will be during weeks 5-10. Please no more than 4 presentations per week.
- If there is a function you are interested in presenting that is not on the signup sheet, please check with me. If it hasn’t been covered before and isn’t covered in the class, then most likely I will approve it.
- Please upload to Sakai your FOTW presentation by 7 am of the day you are presenting.
- Cascadia R Conf in June 26-27 this year. It will be held at OHSU in RLSB. This is a great conference to meet other R enthusiasts in the area and learn more about what they are working on.

Class materials
- Class materials in OneDrive folder BSTA_526_W26_class_materials_public.
- For today’s class, make sure to download to your computer the folder called
part8. - Open RStudio by double-clicking on the project file called
BSTA_526_W26_class_materials_public.Rprojin the main OneDrive folder.
Note: The link to the slides version of the class notes is not working. Please see the OneDrive folder for the html of the slides.
| Part | OneDrive folder | Slides | Webpage |
|---|---|---|---|
| 8 |
Readings
Required
- R4DS book:
- Functions: Chapter 25
- Lists: Section 23.2
Optional
Post-class survey
- Please fill out the post-class survey to provide feedback. Thank you!
- Previous muddiest points and clearest points with responses are collected here.
Homework
- See OneDrive folder for homework assignment.
- HW 8 due on 02/26.
Recording
- In-class recording links are on Sakai. Navigate to Course Materials -> Schedule with links to in-class recordings.