How it works…

The print part is a generic function in R. A generic function is a generalized concept, for example, printing results is a generic concept and the corresponding generic function is print. This function works differently based on the class of the objects. The object x here has the class robustSummary. As a result, whenever you call the object itself into the R console, it actually calls the print.robustSummary() function.

However, before calling the print.robustSummary() function, you must define it and specify the behavior of the function; for example, it should know what to print, what should be the format, and so on.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset