[Rd] getMethods() not finding all methods

Steven McKinney
Thu, 12 Oct 2006 23:58:16 -0000

Running R2.4.0 on Apple Mac OS X 10.4.8,
in Emacs ESS mode, and also R.app.


In an attempt to learn a bit more about
a particular method (geneNames in package affy)
I invoked

  getMethods("geneNames")

which produced geneNames methods, but not the
one in affy (output below).

I had to know the signature (AffyBatch) in order
to find the method

> getMethod("geneNames", "AffyBatch")

Isn't getMethods() supposed to get them all?

Is this a problem, or bug, or am I misunderstanding
something?

I try to use getMethods() to learn how things work,
without having to always get the source code and
grep my way through the source.  Is there another
way to get all methods that I should be using?

Any info appreciated.




> library(affy)
Loading required package: Biobase
Loading required package: tools

Welcome to Bioconductor

    Vignettes contain introductory material. To view, type
    'openVignette()' or start with 'help(Biobase)'. For details
    on reading vignettes, see the openVignette help page.

Loading required package: affyio
> getMethods("geneNames")
An object of class ?MethodsList?
Slot "methods":
$ExpressionSet
Method Definition:

function (object)
{
    .Deprecated("featureNames")
    featureNames(object)
}
<environment: namespace:Biobase>

Signatures:
        object
target  "ExpressionSet"
defined "ExpressionSet"

$exprSet
Method Definition:

function (object)
featureNames(object)
<environment: namespace:Biobase>

Signatures:
        object
target  "exprSet"
defined "exprSet"


Slot "argument":
object

Slot "allMethods":
$ExpressionSet
Method Definition:

function (object)
{
    .Deprecated("featureNames")
    featureNames(object)
}
<environment: namespace:Biobase>

Signatures:
        object
target  "ExpressionSet"
defined "ExpressionSet"

$exprSet
Method Definition:

function (object)
featureNames(object)
<environment: namespace:Biobase>

Signatures:
        object
target  "exprSet"
defined "exprSet"


> search()
 [1] ".GlobalEnv"        "package:affy"
"package:affyio"    "package:Biobase"
"package:tools"     "tools:RGUI"
 [7] "package:methods"   "package:stats"
"package:graphics"  "package:grDevices"
"package:utils"     "package:datasets"
[13] "Autoloads"         "package:base"

> getMethod("geneNames", "AffyBatch")
Method Definition:

function (object)
{
    cdf.envir <- getCdfInfo(object)
    return(ls(env = cdf.envir))
}

Signatures:
        object
target  "AffyBatch"
defined "AffyBatch"
>




Steven McKinney

Statistician
Molecular Oncology and Breast Cancer Program
British Columbia Cancer Research Centre

email: smckinney at bccrc.ca

tel: 604-675-8000 x7561

BCCRC
Molecular Oncology
675 West 10th Ave, Floor 4
Vancouver B.C.
V5Z 1L3
Canada