Skip to content

[Bioc-devel] ExpressionSet and LumiBatch: inheritance problem in S4 methods for union class

3 messages · Renaud Gaujoux, Martin Morgan

#
On 05/07/2013 04:04 AM, Renaud Gaujoux wrote:
I can replicate this with a simpler example, where PkgA has

   setClass("A", representation(x="numeric"))

with NAMESPACE

   import(methods)
   exportClasses("A")

PkgB has

   setClass("B", contains="A")

NAMESPACE

   import(methods)
   importClassesFrom("PkgA", "A")
   exportClasses("B")

and then

   library(PkgA); library(PkgB)
   setClassUnion("C", c("matrix", "A"))
   setGeneric("do", function(x) standardGeneric("do"))
   setMethod("do", "C", function(x) "done")

leading to

   > do(new("A"))
   [1] "done"
   > do(new("B"))
   Error in (function (classes, fdef, mtable)  :
     unable to find an inherited method for function ?do? for signature ?"B"?

suggesting name space issues rather than something about ExpressionSet. The 
sample packages and test script are attached; it would be appropriate to pursue 
this on the R-devel mailing list.

Martin