USF Information Science Blog

Coding and Statistics work for the University of South Florida. Completed by Alina Hagen


Module 7: R Object: S3 vs. S4 assignment

I believe the best way to read my blog on this topic is to follow along with my compiled R script, where I used R comments to narrate as I explored the questions for this week. S3 and S4 objects, while a confusing subject, is very important for understanding object oriented programing with R.

This week, we were asked to anwser:

  1. How do you tell what OO system (S3 vs. S4) an object is associated with?
  2. How do you determine the base type (like integer or list) of an object?
  3. What is a generic function?
  4. What are the main differences between S3 and S4?
  5. In your GitHub, create two examples of S3 and S4.

All of my answers to these questions can be found in the compiled report below: They can also be found on my Github in my R script

As always, the link to my GitHub: here

Published by


Leave a comment