[Bioc-devel] Importing generic functions from other pkgs and defining methods on them?

Wolfgang Huber huber at ebi.ac.uk
Thu Mar 8 19:14:04 CET 2007


I post this problem to the list b/c perhaps others have it as well and
so we only need to solve it once. Something with S4 and Namespaces
appears to have changed. With the current R-devel, I get from "R CMD
check tilingArray":

    .... SNIP ...
* checking package vignettes in 'inst/doc' ... WARNING
*** Weave Errors ***
Error :  chunk 8 (label=penLLsim)
Error in logLik(seg) : no applicable method for "logLik"

When I run Sweave on the vignette interactively, there is no error!
Also, the package used to pass R CMD check a while ago, and has not
changed - but of course R has changed. In my NAMESPACE I have:

  importFrom("stats", "confint", "logLik", "residuals")

and in tilingArray/R/methods-segmentation.R

setMethod("logLik", "segmentation",
  function(object, penalty="none", ...) {
    ## BLA

Does anybody have a pointer for where to look at?

 Best wishes

> sessionInfo()
R version 2.5.0 Under development (unstable) (2007-03-08 r40820)


attached base packages:
 [1] "splines"   "grid"      "tools"     "stats"     "graphics"  "grDevices"
 [7] "utils"     "datasets"  "methods"   "base"

other attached packages:
 tilingArray       pixmap  geneplotter      lattice     annotate
    "1.13.3"      "0.4-6"     "1.13.7"    "0.14-16"     "1.13.6"
    survival          vsn  strucchange     sandwich          zoo
      "2.31"     "2.0.18"      "1.3-1"      "2.0-1"      "1.2-2"
        affy       affyio      Biobase     fortunes
   "1.13.14"      "1.3.3"    "1.13.39"      "1.3-2"

More information about the Bioc-devel mailing list