[Bioc-devel] Importing generic functions from other pkgs and defining methods on them?
Florian Hahne
f.hahne at dkfz.de
Fri Mar 9 00:09:51 CET 2007
Hi Wolfgang,
do you export your method in the NAMSPACE? There should be an
exportMethods("logLik"). I had similar problems a while ago. The error
message indicates that there is no logLik method, so the problem isn't
the import but rather the export, I suppose. The environment in R CMD
check in not the same as when running Sweave interactively, so although
the latter works with a misconfigured NAMESPACE, R CMD check may fail.
Florian
Wolfgang Huber schrieb:
> Hi,
>
> 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 ***
> File
> /net/nfs7/vol6/research-huber/users/huber/madman/Rpacks/tilingArray.Rcheck/tilingArray/doc/findsegments.Rnw
> :
> 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
> Wolfgang
>
>
>
>
>
>> sessionInfo()
>>
> R version 2.5.0 Under development (unstable) (2007-03-08 r40820)
> x86_64-unknown-linux-gnu
>
> locale:
> LC_CTYPE=en_GB.UTF-8;LC_NUMERIC=C;LC_TIME=en_GB.UTF-8;LC_COLLATE=en_GB.UTF-8;LC_MONETARY=en_GB.UTF-8;LC_MESSAGES=en_GB.UTF-8;LC_PAPER=en_GB.UTF-8;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=en_GB.UTF-8;LC_IDENTIFICATION=C
>
> attached base packages:
> [1] "splines" "grid" "tools" "stats" "graphics" "grDevices"
> [7] "utils" "datasets" "methods" "base"
>
> other attached packages:
> tilingArray pixmap geneplotter lattice annotate
> genefilter
> "1.13.3" "0.4-6" "1.13.7" "0.14-16" "1.13.6"
> "1.13.8"
> survival vsn strucchange sandwich zoo
> RColorBrewer
> "2.31" "2.0.18" "1.3-1" "2.0-1" "1.2-2"
> "0.2-3"
> affy affyio Biobase fortunes
> "1.13.14" "1.3.3" "1.13.39" "1.3-2"
>
> _______________________________________________
> Bioc-devel at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel
>
More information about the Bioc-devel
mailing list