[R] How to get the definition of a class?
pengyu.ut at gmail.com
Wed Oct 14 05:12:17 CEST 2009
On Tue, Oct 13, 2009 at 9:38 PM, Martin Morgan <mtmorgan at fhcrc.org> wrote:
> Peng Yu wrote:
>> I have an object of the above class. The following document mentioned it.
>> But I would like to see its defintion. I'm wondering if there is a way
>> in R to give me the definition of any class?
> It is defined by a call to setClass in the package that defines it
> (oligoClasses); I believe the package source (in this case,
> oligoClasses/R/AllClasses.R) is the only place where the explicit call
> is available.
> A representation of the class is available with
> cls = getClass("ExonFeatuereSet")
> show(cls) displays a summary of the class, class(cls) tells you how
> classes are represented (as class classRepresentation),
> class?classRepresentation provides information on the representation of
> oligoClasses:::.__C__ExonFeatureSet is the definitive instance of the
> class representation (hiding inside the name space and obscured, so
> clearly not meant for direct access).
Are functions like slotNames, show, etc., that are mentioned in
Section C (Memo) of the Appendix in "A (Not So) Short Introduction to
S4" defined in R language? Or they are function that should be provide
by any S4 class?
More information about the R-help