A generic function is an encapsulation of any generic concept such as printing, calculating summary information of any R objects, creating graphs, and so on. The generic function does not perform any calculation, rather it just dispatches methods based on the class of the objects. In this recipe, you will create your own generic function and then define the method for the class robustStatistics.