Re: [Rd] Creating S3 methods for S4 classes (coming from r-package-devel)

2018-05-24 Thread Michael Lawrence
On Thu, May 24, 2018 at 10:47 AM, Joris Meys wrote: > > > On Thu, May 24, 2018 at 6:20 PM, Michael Lawrence > wrote: >> >> You only have to make an S4 method if there is already an S4 generic. >> If there is just an S3 generic, then just define S3 methods on it. > > > I was refering to the recomm

Re: [Rd] Creating S3 methods for S4 classes (coming from r-package-devel)

2018-05-24 Thread Joris Meys
On Thu, May 24, 2018 at 6:20 PM, Michael Lawrence wrote: > You only have to make an S4 method if there is already an S4 generic. > If there is just an S3 generic, then just define S3 methods on it. I was refering to the recommendations in ?Methods_for_S3 ( https://stat.ethz.ch/R-manual/R-devel/

Re: [Rd] Creating S3 methods for S4 classes (coming from r-package-devel)

2018-05-24 Thread Michael Lawrence
You only have to make an S4 method if there is already an S4 generic. If there is just an S3 generic, then just define S3 methods on it. I think we should stay away from defining S4 generics when there is no good reason for them. Good reasons include multiple dispatch, or a non-default signature. N