Skip to Content
R Programming By Example
book

R Programming By Example

by Omar Trejo Navarro
December 2017
Beginner to intermediate
470 pages
12h 29m
English
Packt Publishing
Content preview from R Programming By Example

The second source of confusion – generic functions

Another big difference with popular object-oriented languages like the ones mentioned before is that R implements parametric polymorphism, also known as generic functions, which implies that methods belong to functions, not classes. Generic functions allow the same name to be used for many different functions, with many different sets of arguments, from many different classes. This means that the syntax to call a class's method is different from the normally chained syntax you find in other languages (normally implemented with a "." (dot) between a class and the method we want to call), which is called message-passing.

R's method calls look just like function calls, and R must know which ...

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

Efficient R Programming

Efficient R Programming

Colin Gillespie, Robin Lovelace
R Programming

R Programming

Jared P. Lander

Publisher Resources

ISBN: 9781788292542Supplemental Content