Skip to content

[Bioc-devel] [Rd] Error on executing functions from installed package

1 message · Hervé Pagès

#
Hi Kamal,

The "rbind" method for SummarizedExperiment objects is defined in the
GenomicRanges package:

   > library(GenomicRanges)
   > selectMethod("rbind", "SummarizedExperiment")
   Method Definition:

   function (..., deparse.level = 1)
   {
     args <- unname(list(...))
     .rbind.SummarizedExperiment(args)
   }
   <environment: namespace:GenomicRanges>

   Signatures:
         ...
   target  "SummarizedExperiment"
   defined "SummarizedExperiment"

And the rbind() generic is defined in the BiocGenerics package:

   > rbind
   standardGeneric for "rbind" defined from package "BiocGenerics"

   function (..., deparse.level = 1)
   standardGeneric("rbind")
   <environment: 0x1f0b8b0>
   Methods may be defined for arguments: ...
   Use  showMethods("rbind")  for currently available ones.

So your package needs to import at least the rbind() generic from
BiocGenerics + I think the method from GenomicRanges:

   importFrom(BiocGenerics, rbind)
   importMethodsFrom(GenomicRanges, rbind)

I would highly recommend that you actually import *all* the generics
from BiocGenerics:

   import(BiocGenerics)
   importMethodsFrom(GenomicRanges, rbind)

You also need to put BiocGenerics and GenomicRanges in the Depends field
of your DESCRIPTION file (yes Depends, not Imports -- you can also put
it in both even though some people might try to argue against this).

Please let us know if that still doesn't solve the problem.

Cheers,
H.
On 06/26/2013 07:37 AM, Kamal wrote: