Skip to Content
Modern R Programming Cookbook
book

Modern R Programming Cookbook

by Jaynal Abedin
October 2017
Beginner to intermediate
236 pages
7h 38m
English
Packt Publishing
Content preview from Modern R Programming Cookbook

How it works…

The first phase of defining a generic function is defining a function and mentioning the use method for that function. The function robSum() has use method robSum; in other words, using this name, you have to call this generic function.

Every generic function usually has a default method where the default task has been defined. In this example, the default method is just printing a line of text This is a generic function for the object class robustSummary. Whenever the default method of this robSum() generic function call or the input object's class is not robustSummary, it will print this default line.

The final step is to define the method for the targeted class. In this example, the class name is robustSummary. The method ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

R Cookbook, 2nd Edition

R Cookbook, 2nd Edition

JD Long, Paul Teetor

Publisher Resources

ISBN: 9781787129054Supplemental Content