Functions and OOP

Week 08, Fall 2024

Summary

This week we will wrap up discuss of Base R. We will introduce a new paradigm call the tidyverse next week. 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, October 24 100%
Quiz 05 Thursday, October 24 105%

Office Hours

Daniel’s Tuesday office hours now from 2:30 to 3:30 PM Champaign time