Skip to content
Prev 31916 / 63424 Next

exporting s3 and s4 methods

If a package defined an S3 generic and an S4 generic for the same function (so as to add methods for S4 classes to the existing code), how do I set up the namespace to have them exported?

With 
import(stats)
exportMethods(bigglm)
importClassesFrom(DBI)
useDynLib(biglm)
export(biglm)
export(bigglm)
in NAMESPACE, the S3 generic is not exported.
[1] bigglm.RODBC*      bigglm.data.frame* bigglm.function*

    Non-visible functions are asterisked
Warning messages:
1: In findGeneric(generic.function, parent.frame()) :
   'bigglm' is a formal generic function; S3 methods will not likely be found
2: In methods("bigglm") : function 'bigglm' appears not to be generic


[This is R 2.7.2, admittedly a little ancient]

       -thomas

Thomas Lumley			Assoc. Professor, Biostatistics
tlumley at u.washington.edu	University of Washington, Seattle