Try Object-Oriented Programming with S3 and R6 in R
Download PDF