GitHub
LinkedIn
Twitter
YouTube
RSS

Training Course Details

Object Oriented Programming in R

Object Oriented Programming in R

Course Level: Advanced

The training course will cover R object-oriented programming techniques. We’ll discuss what OOP is and the different varieties within R. Beginning with the popular S3 and S4 OOP frameworks, we’ll finish with the new {R6} package that is used extensively in Shiny applications. By the end of the course, participants will be able to use OOP within their own code.

No Events Currently Scheduled

Sorry, there are no upcoming events for this course, but please get in touch if you would like to be kept informed when events are scheduled in the future.

View our full training course calendar »

Course Details

  • Course Outline
  • Learning Outcomes
  • Materials
  • Prior Knowledge

Course Outline

  • Advanced Functions:

    • Scoping rules (including lexical scope)
    • The … argument
    • Argument matching
  • S3 classes:

    • Introduction to object-oriented programming
    • Constructing S3 objects
    • Drawbacks
  • S4 classes:

    • Creating and using S4 classes
    • Differences between S3 and S4 classes
  • R6 classes

    • Differences between {R6} and S3/S4
    • Mutable states
    • Creating methods
    • Shallow and deep copies

Learning Outcomes

By the end of the course, participants will be able to…

  • Select the most appropriate form of OOP for their task
  • Leverage encapsulation, polymorphism and inheritance to provide a nice user interface to their code
  • Write functions with rich results, user-friendly display and programmer-friendly internals
  • Extend the functionality of functions for new object types
  • Write code that is extensible by others

Materials

  • Example course material for 'Object Oriented Programming in R
  • Example course material for 'Object Oriented Programming in R
  • Example course material for 'Object Oriented Programming in R
  • Example course material for 'Object Oriented Programming in R
  • Example course material for 'Object Oriented Programming in R

Prior Knowledge

This course assumes that participants are comfortable with the fundamentals of R programming, writing functions and control flow. It follows on from the Programming with R course.

Attendee Feedback