Classes and Methods
Advanced R
Slides
Here’s a link to the slides in a new window.
Here are the slides embedded:
Resources
Reading
- Main reference for this section, goes a bit further (including R6): Wickham, H, Advanced R (2nd edn), Object-oriented programming section
https://adv-r.hadley.nz/oo.html
Fun example creating
Turtle
andTurtleWithPen
classes to create simple graphics by moving the turtle