[Bioc-devel] resolving warnings...

Martin Morgan mtmorgan at fhcrc.org
Fri Mar 4 14:56:37 CET 2011


Hi Stefano --

On 03/04/2011 02:21 AM, Stefano Berri wrote:
> Hi.
> I am working to make a package for Bioconductor.
> I can run 
> 
> R CMD build
> 
> with no error nor warnings
> 
> but when I run 
> 
> R CMD INSTALL
> 
> I have the following warnings:
> 
> ++++++++++++++++++++++++++++++++++++
> ** preparing package for lazy loading
> Warning in matchSignature(signature, fdef, where) :
>   in the method signature for function "initialize" no definition for class:
> ³CNAnorm²
> Warning in matchSignature(signature, fdef, where) :
>   in the method signature for function "initialize" no definition for class:
> ³InData²

These sound like a problem with the DESCRIPTIONN file, Collate: field,
where you need to arrange for your source files to be read in to R in
such a way that the class definitions occur before the corresponding
method definitions.

> Creating a new generic function for "summary" in "CNAnorm"
> Creating a new generic function for "as.data.frame" in "CNAnorm"

These messages occur once per package, probably your package is called
CNAnorm. It means that you have written a method, e.g.,
setMethod("summary", ...) without first promoting the plain function
'summary' to a generic, either with setGeneric("summary" <...>) or by
importing an appropriate generic or methods from a package that your
class depends on, e.g., by adding the package to DESCRIPTION Imports:
and NAMESPACE importFrom.

> ++++++++++++++++++++++++++++++++++++
> 
> When running R CMD CHECK
> 
> +++++++++++++++++++++++++++++++++++
> * checking for unstated dependencies in R code ... WARNING
> Warning in methods::findMethods(g, env) :
>   non-generic function 'initialize' given to findMethods()

Here I think you need to add to DESCRIPTION

  Imports: methods

and to NAMESPACE

  import(methods)

Hope that helps,

Martin

> Warning in methods::findMethods(g, env) :
>   non-generic function 'show' given to findMethods()
> ...
> * checking foreign function calls ... WARNING
> Warning in methods::findMethods(g, env) :
>   non-generic function 'initialize' given to findMethods()
> Warning in methods::findMethods(g, env) :
>   non-generic function 'show' given to findMethods()
> +++++++++++++++++++++++++++++++++++
> 
> 
> 
> What does it mean? I have four Classes, only Class "InData" has a 'validity'
> statement. InData is one slot of Class CNAnorm
> 
> Also I am a bit puzzled by the "Creating generic function..."
> 
> I have summary for all my classes, but only CNAnorm give me that message...
> 
> Thanks for your help
> 
> Stefano
> 
> _______________________________________________
> Bioc-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/bioc-devel


-- 
Computational Biology
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N. PO Box 19024 Seattle, WA 98109

Location: M1-B861
Telephone: 206 667-2793



More information about the Bioc-devel mailing list