Skip to content
Prev 75092 / 398502 Next

oldClass vs. class

On Sat, 6 Aug 2005, ronggui wrote:

            
Many R objects have a 'class' attribute, a character vector giving
      the names of the classes which the object "inherits" from.  If the
      object does not have a class attribute, it has an implicit class,
      '"matrix"', '"array"' or the result of 'mode(x)'.  (Functions
      'oldClass' and 'oldClass<-' get and set the attribute, which can
      also be done directly.)

so class returns the implicit class, and oldClass does not.
[1] "matrix"
NULL

just as it says.