Skip to main content

S4 Classes

  • Chapter
  • First Online:
Advanced Object-Oriented Programming in R
  • 3378 Accesses

Abstract

The S3 class system is the wild west of object-oriented programming. Class hierarchies only exist implicitly through the class attributes, and generic methods can be implemented or not by any class whatsoever, with no check that interfaces and class hierarchy designs are implemented correctly. Everything depends on conventions and it is entirely up to the programmer to ensure anything resembling consistency.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 19.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 29.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2017 Thomas Mailund

About this chapter

Cite this chapter

Mailund, T. (2017). S4 Classes. In: Advanced Object-Oriented Programming in R. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-2919-4_6

Download citation

Publish with us

Policies and ethics