[R-pkg-devel] Deprecating apparent S3 method, changing name
Ivan Krylov
|kry|ov @end|ng |rom d|@root@org
Tue Oct 1 13:45:37 CEST 2024
В Tue, 1 Oct 2024 09:00:24 +0200
Jan van der Laan <eoos using dds.nl> пишет:
> S3method(esa, plot, esaplotmethod)
>
> To register `esaplotmethod` as the method that is called when using
> `esa` with an object of type `plot`. This would prevent this issue.
> However, this probably (can't test as the note doesn't happen on my
> system) doesn't resolve the issue with the NOTE.
Excellent idea, thank you! It does work for R CMD check as well:
Sys.setenv("_R_CHECK_S3_METHODS_SHOW_POSSIBLE_ISSUES_" = 'TRUE')
tools::checkS3methods(dir = '.') # used to show esa.plot as well
# Apparent methods for exported generics not registered:
# fxi.contour fxi.mode
No need for extra bits or attributes on the esa.plot function, just
register a method for "esa" generic, "plot" class to prevent S3
dispatch from reaching the function in question.
--
Best regards,
Ivan
More information about the R-package-devel
mailing list