Entering edit mode
Speaking as someone who uses Bioconductor due to its extensibility, I
cannot agree with the statement posted a couple of weeks ago to the
list:
"You should not really need to know about the classes -> they should
be relatively transparent at the user level. "
In order to do anything not written into Bioconductor, I needed to
understand the classes. The documentation is good - once I understood
what
it meant. So, to help others, here are some things I learned.
Every object in R has a class. However, some classes are more
elementary
(e.g. vectors, matrices, tables) and elements are extracted by giving
the
index (e.g. v[3], or m[1,4]). Many R functions return objects which
are
lists. Components of a list can be extracted by name (list$mydata) or
by
component number (list[[3]]). Anything you extract also has a class.
Most Bioconductor objects are NOT elementary. The data stored in the
Bioconductor objects are extracted by functions which are listed in
the
documentation. These are called slots. e.g. maRf(myRawMarray)
extracts
the red foreground from an marrayRaw object). (The ?marrayRaw file
was
extremely helpful in helping me understand all of this.)
Here are some important commands to know:
class(myobject) prints the class of your object
?objectclass prints the documentation for the class
"objectclass"
names(mylist) prints the names of the elements of a list
attributes(myobject) gives more information about the object
methods(myobject) prints the methods associated with myobject
function.class (e.g. plot.ProbeSet is the function that
is
actually called if you type plot(myprobeset) )
--Naomi
Naomi S. Altman 814-865-3791 (voice)
Associate Professor
Bioinformatics Consulting Center
Dept. of Statistics 814-863-7114 (fax)
Penn State University 814-865-1348
(Statistics)
University Park, PA 16802-2111
