Understand R's S3 Object System and deepen your knowledge of R. This video breaks down base R object to the most fundamental aspects showing that a data.frame is just a list, a factor is an integer vector, and matrixes aren't real. Then learn how to write generic functions to create class specific functions using inheritance.
Resources:
Advanced R by Hadley Wickham https://adv-r.hadley.nz/base-types.html
R for Data Science by Hadley Wickham & Garrett Grolemund https://r4ds.had.co.nz/vectors.html
Deep R Programming by Marek Gagolewski https://deepr.gagolewski.com/chapter/230-matrix.html
Timestamps:
0:00 - Intro
0:32 - Vectors & NULLs
0:55 - Types are not classes
1:25 - Lists are vectors too
3:40 - The Posers
3:55 - Poser: data.frame
5:30 - Poser: matrix
7:21 - Poser: factor
8:30 - Class hierarchy
9:25 - S3 function fundamentals
11:03 - S3 dispatch example
12:55 - Method inheritance
13:15 - Geospatial example
15:00 - Using inheritance
15:45 - Wrap up