Functions and OOP

Week 08, Spring 2022

Summary

This week we will wrap up discuss of Base R. When we return from Spring Break, we till introduce a new paradigm call the tidyverse. To round out our discussion of Base R, we’ll touch on a variety of topics including: functions, function composition, conditions, factors, the matrix class, and the S3 system.

Learning Objectives

  • Use functions with the dots, ..., argument.
  • Create and manipulate factors.
  • Create and manipulate matrices.
  • Create new generic functions using S3.
  • Add methods to existing S3 classes.
  • Create messages, warnings, and errors.

Reading

Link Source
Functions AR
S3 HOPR
Matrices HOPR
Base Types AR
S3 AR
Functions DRP
Flow of Execution DRP
Designing Functions DRP
S3 Classes DRP
Matrices and Other Arrays DRP

Video

Title Link Mirror
8.1 - Welcome to Week 08 8.1 - YouTube 8.1 - ClassTranscribe
8.2 - Functions 8.2 - YouTube 8.2 - ClassTranscribe
8.3 - Factors and S3 8.3 - YouTube 8.3 - ClassTranscribe
8.4 - Lab 05: Vectorization 8.4 - YouTube 8.4 - ClassTranscribe
8.5 - Lab 05: S3 8.5 - YouTube 8.5 - ClassTranscribe

Assignments

Assignment Deadline Credit
Lab 05 Thursday, March 23 100%
Quiz 05 Thursday, March 23 105%

Office Hours

Staff and Link Day Time
Zoom with Abdi Tuesday 4:00 PM - 5:00 PM
Zoom with Mallory Wednesday 9:00 AM - 10:00 AM
Zoom with Zhiyuan Wednesday 4:00 PM - 5:00 PM
Zoom with Dave Wednesday 5:00 PM - 7:00 PM
Zoom with Mallory Thursday 1:15 PM - 2:15 PM
Zoom with Abdi Thursday 3:00 PM - 4:00 PM
Zoom with Zhiyuan Thursday 4:00 PM - 5:00 PM
Discussion Forum Any! Any!