Problem: your function is recognised as an unwanted S3 method #53
aitap
started this conversation in
Community Contributions
Replies: 1 comment 5 replies
-
I am wondering why defining a stopList and relying on tools::nonS3methods() is not an option to solve this issue. |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Problem: for historical reasons, your package already exports a function named
<existing generic>.<a potential class name>
. You cannot get rid of it right away for backwards compatibility reasons (it's part of your the API of your package), but(and therefore the CRAN checks) are telling you that you have an "apparent method for exported generic not registered".
Solution: suggested by Jan van der Laan
You can keep exporting your original function named
generic.class
without it becoming an S3 method if you explicitly register a different S3 method for thatgeneric
andclass
.In your
NAMESPACE
:In your R code:
Beta Was this translation helpful? Give feedback.
All reactions