Re: [Rd] exporting s3 and s4 methods

2009-03-18 Thread John Chambers
Could you send me your package code, off-list. I think the problem may be related to non-exported S3 method objects. John Thomas Lumley wrote: I'm still having problems getting a package to define both S3 and S4 methods for the same new generic, on a current r-devel (version 48144). Sympt

Re: [Rd] exporting s3 and s4 methods

2009-03-18 Thread Thomas Lumley
I'm still having problems getting a package to define both S3 and S4 methods for the same new generic, on a current r-devel (version 48144). Symptoms example(bigglm) bigglm> data(trees) bigglm> ff<-log(Volume)~log(Girth)+log(Height) bigglm> a <- bigglm(ff,data=trees, chunksize=10, sandwich

Re: [Rd] exporting s3 and s4 methods

2009-03-17 Thread John Chambers
Thomas Lumley wrote: On Tue, 17 Mar 2009, John Chambers wrote: It's important though to use the default, one argument, call to setGeneric(). Otherwise the two functions are not consistent and can't exist in the same namespace. Thanks. Does this include restricting which arguments are used fo

Re: [Rd] exporting s3 and s4 methods

2009-03-17 Thread Thomas Lumley
On Tue, 17 Mar 2009, John Chambers wrote: It's important though to use the default, one argument, call to setGeneric(). Otherwise the two functions are not consistent and can't exist in the same namespace. Thanks. Does this include restricting which arguments are used for dispatch? I have s

Re: [Rd] exporting s3 and s4 methods

2009-03-17 Thread John Chambers
You shouldn't have to export the S3 function: in the normal practice, setGeneric("biglm") or just a setMethod("biglm", ) will cause the S3 function (like any existing function) to become the default method for the S4 generic. There is only one object called "biglm". It's important though

[Rd] exporting s3 and s4 methods

2009-03-17 Thread Thomas Lumley
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(bi