Post tagged: S3

Primitive R objects and S3

Objects are just lists and class is just an attribute.

Primordial R objects

The first thing to know is that nearly every object in R is really just a list with named elements. For example, the results returned from "summary" are returned in an object:

x <- summary(c(1:10))
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max.
##    1 ...