[prev in list] [next in list] [prev in thread] [next in thread]
List: bioc-devel
Subject: [Bioc-devel] methods package is not attached in .onLoad for
From: sfalcon () fhcrc ! org (Seth Falcon)
Date: 2006-02-02 17:36:53
Message-ID: m2k6cdbr2i.fsf () ziti ! local
[Download RAW message or body]
Hi Florian,
On 2 Feb 2006, fhahne at gmx.de wrote:
> I just noticed some strange behaviour when starting R with a saved
> workspace containing objects of class cytoFrame or cytoSet. These
> classes are defined in my own package prada and make heavy use of
> Biobase generics. I get the error
>
> Error in .initContents() : couldn't find function "isGeneric"
> Error: .onLoad failed in 'loadNamespace' for 'Biobase'
> Fatal error: unable to restore saved data in .RData
>
> When looking at the .onLoad function for Biobase I realized that the
> methods package is not attached thus isGeneric can not be found in
> the call to .initContents(). Adding a required(methods) to .onLoad
> fixed this for me. To my understanding, attaching methods is
> mandatory for every package that uses the S4 system (at least that's
> what's stated in the writing R extensions documentation), so I guess
> it should be fixed?!
Absolutely. Thanks for the report. A fix is in svn and will show up
in the devel repository within 24hrs or so.
Note to other package maintainers:
If your package has a NAMESPACE file and you define S4 classes or
methods, it is essential that you add a .onLoad function that looks
like this to your package:
.onLoad <- function(libname, pkgname) {
require("methods")
}
Best,
+ seth
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic