[R] How to get the definition of a class?

Martin Morgan mtmorgan at fhcrc.org
Wed Oct 14 04:38:55 CEST 2009


Peng Yu wrote:
> Hi,
> 
> ExonFeatureSet
> 
> I have an object of the above class. The following document mentioned it.
> 
> http://www.bioconductor.org/packages/2.5/bioc/vignettes/oligo/inst/doc/ClassesUsedInOligo.pdf
> 
> 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
classes.

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).

Martin

> 
> Regards,
> Peng
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.


-- 
Martin Morgan
Computational Biology / Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N.
PO Box 19024 Seattle, WA 98109

Location: Arnold Building M1 B861
Phone: (206) 667-2793




More information about the R-help mailing list