A method is just an implementation of a generic function of any R object with a particular class of interest. The method in any OOP is the efficient way to perform certain customized tasks. Once you have a class and associated method, then you just need to call the generic function and the method. The method actually does not perform any operation, rather it just dispatches a specific function based on the class of the objects. For example, when you call print() on a data.frame object, it calls print.data.frame(). In this recipe, you will define a new method for the newly defined class robostSummary so that it only shows robust descriptive statistics of an object.
Defining methods for the S3 class
Getting ready
In R, generally...