In the development of a computer program (software design), the process of defining data types of a data structure along with the types of operations using user-defined functions on the data structure is known as object-oriented programming (OOP). In the OOP process, the data structure becomes an object, and the function and the data itself are contained within that object. The R programming has a system of OOP using generic functions. The two most popular classes are used in R to do OOP, namely, S3 and S4. In this chapter, you will learn about both S3 and S4 classes and then create new methods based on those classes.




















































