R Language Classes

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!

Introduction

The class of a data-object determines which functions will process its contents. The class-attribute is a character vector, and objects can have zero, one or more classes. If there is no class-attribute, there will still be an implicit class determined by an object's mode. The class can be inspected with the function class and it can be set or modified by the class<- function. The S3 class system was established early in S's history. The more complex S4 class system was established later

Remarks

There are several functions for inspecting the "type" of an object. The most useful such function is class, although sometimes it is necessary to examine the mode of an object. Since we are discussing "types", one might think that typeof would be useful, but generally the result from mode will be more useful, because objects with no explicit "class"-attribute will have function dispatch determined by the "implicit class" determined by their mode.



Got any R Language Question?