Re: [R-pkg-devel] R CHECK warning about new S3 generic/method consistency

2024-03-11 Thread Uwe Ligges
On 11.03.2024 19:34, CRAN.r wrote: No, your assumption is backwards. The methods do need to include all arguments of the generic. As Writing R Extensions says near the start of section 7, "A method must have all the arguments of the generic, including … if the generic does." That's

Re: [R-pkg-devel] R CHECK warning about new S3 generic/method consistency

2024-03-11 Thread CRAN.r
> No, your assumption is backwards. The methods do need to include all > arguments of the generic. As Writing R Extensions says near the start > of section 7, "A method must have all the arguments of the generic, > including … if the generic does." That's embarrassing. I was worried it was

Re: [R-pkg-devel] R CHECK warning about new S3 generic/method consistency

2024-03-11 Thread Duncan Murdoch
On 11/03/2024 2:13 p.m., CRAN.r wrote: On Monday, March 11th, 2024 at 12:43 PM, Diego Hernangómez Herrero wrote: Shouldn’t you include the y argument also inmyscale.default ? Your generic is defining that argument as well. I assume (hopefully correctly) that methods don't need to include

Re: [R-pkg-devel] R CHECK warning about new S3 generic/method consistency

2024-03-11 Thread Diego Hernangómez Herrero
Usually when I write a generic I use … in the definition to allow using additional arguments in specific methods, see as_bibentry <- function(x, ...) { UseMethod("as_bibentry") } as_bibentry.cff <- function(x, ..., what = c("preferred", "references", "all")) { } but in any case the method

Re: [R-pkg-devel] R CHECK warning about new S3 generic/method consistency

2024-03-11 Thread CRAN.r
On Monday, March 11th, 2024 at 12:43 PM, Diego Hernangómez Herrero wrote: > Shouldn’t you include the y argument also inmyscale.default ? Your generic is > defining that argument as well. I assume (hopefully correctly) that methods don't need to include all the arguments of the generic. I

Re: [R-pkg-devel] R CHECK warning about new S3 generic/method consistency

2024-03-11 Thread Diego Hernangómez Herrero
Shouldn’t you include the y argument also in myscale.default ? Your generic is defining that argument as well. Have a nice day! El El lun, 11 mar 2024 a las 18:25, CRAN.r escribió: > I'm trying to define a new generic, and keep getting an S3 generic/method > consistency when running R