Book Image

R Object-oriented Programming

By : Kelly Black
Book Image

R Object-oriented Programming

By: Kelly Black

Overview of this book

Table of Contents (19 chapters)
R Object-oriented Programming
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
4
Calculating Probabilities and Random Numbers
Package Management
Index

Summary


This chapter introduced basic ideas to specify optional execution of certain commands and the three basic loop constructs. We had to take a side trip to discuss the idea of scope and explore how R finds and interprets the meaning of a variable name. You can combine these ideas to create and implement algorithms and execute commands in a file.

This chapter also includes our first taste of object-oriented programming in the sense of an S3 class. We build on this idea in the next chapter where the S3 class is formally defined. In doing so, we explore how existing functions can be extended to accommodate arguments that include a class that we have constructed.