getClass {methods} | R Documentation |
Get the definition of a class.
getClass(Class, .Force = FALSE)
getClassDef(Class, where=-1)
Class |
the character-string name of the class. |
.Force |
if |
where |
where to search for the definition; by default, anywhere on the current search list. |
A call to getClass
returns the complete definition of the class
supplied as a string, including all slots, etc. in classes that this
class extends. A call to getClassDef
returns the definition of
the class from the environment where
, unadorned. It's usually getClass
you want.
If you really want to know whether a class is formally
defined, call isClass
.
The object defining the class. This is an object of class
"classRepEnvironment"
. However, do not deal with the
contents of the object directly unless you are very sure you know what
you're doing. Even then, it is nearly always better practice to use
functions such as setClass
and setIs
.
Messing up a class object will cause great confusion.
John Chambers
The web page http://www.omegahat.org/RSMethods/index.html is the primary documentation.
The functions in this package emulate the facility for classes and methods described in Programming with Data (John M. Chambers, Springer, 1998). See this book for further details and examples.
Classes,
setClass
,
isClass
.
getClass("numeric") ## a built in class