[Rd] S4 package warning

From: Robin Hankin <rksh1_at_cam.ac.uk>
Date: Wed, 10 Nov 2010 09:53:30 +0000

Hello everyone. R-2.12.0, suse linux 11.3.

I am debugging a package that uses S4 methods and R CMD check gives the following warning:

> Warning in methods::findMethods(g, env) :
> non-generic function 'mdm' given to findMethods()
> See the information on DESCRIPTION files in the chapter 'Creating R
> packages' of the 'Writing R Extensions' manual.

I don't see anything obvious in that part of the R-exts but FWIW, here is my DESCRIPTION file:

> Package: multivator
> Type: Package
> Title: A multivariate emulator
> Version: 1.0-1
> Depends: R(>= 2.10.0), emulator, methods, utils
> Date: 2009-10-27
> Author: Robin K. S. Hankin
> Maintainer: <hankin.robin_nospamAT_gmail.com>
> Description: A multivariate generalization of the emulator package
> License: GPL-2
> LazyLoad: yes

I think that the lines in question in my package are:

> setClass("mdm", # "mdm" == "multivariate design matrix"
> representation = representation(
> xold = "matrix",
> types = "factor"
> )
> )
> setGeneric("mdm",function(xold,types){standardGeneric("mdm")})
> setMethod("mdm",signature("matrix","factor"),function(xold, types){
> new("mdm", xold=xold, types=types)
> } )

which appear to execute without warning on a virgin console. In the package, there are three
or four other S4 classes which are on the same footing as the mdm class, but do not appear to generate a warning from R CMD check. The same happens AFAICS on R-2.13, 53543

Can anyone advise on how to deal with the warning?

thank you


Robin K. S. Hankin
Uncertainty Analyst
University of Cambridge
19 Silver Street
Cambridge CB3 9EP

R-devel_at_r-project.org mailing list
Received on Wed 10 Nov 2010 - 09:55:15 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Fri 12 Nov 2010 - 18:00:19 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive