Abstract
In R, objects belong to classes as well as types and modes. Classes tell something about what the object contains. All objects belong to at least one class. The S3, S4, and Reference Class object systems differ regarding classes. In S3, there are specific classes into which an R object falls. In S4, the user defines a class for an S4 object. Classes in S3 are called informal classes, whereas classes in S4 are called formal classes. In both systems, classes are functional classes. In Reference Class, the classes are formal and referential. (For functional classes, an object is only changed when assigned a new value—locally. For referential classes, when an object changes, the value of the object changes everywhere the object is present.) Reference Class classes are usually defined for packages. This chapter covers the three kinds of classes.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Similar content being viewed by others
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 2022 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature
About this chapter
Cite this chapter
Tollefson, M. (2022). Classes of Objects. In: R 4 Quick Syntax Reference. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7924-3_5
Download citation
DOI: https://doi.org/10.1007/978-1-4842-7924-3_5
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-7923-6
Online ISBN: 978-1-4842-7924-3
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)