-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to document S7 methods? #315
Comments
For single dispatch methods, one could just follow the S3 conventions, right? And since double dispatch is just based on single dispatch, they could use the same approach for now? |
It's not urgent to solve this problem because R CMD check currently isn't aware of S7 methods, so does not require that they be documented. But we do need to think about this longer term: do we want S7 to be like S3 where method documentation is optional or like S4 where it's required? Or do we want something new? (e.g. only require method documentation if the generic uses We also need to think about the overall help experience. Do we expect to provide an |
Could a Looking at the S7 basics it currently has...
But I could imagine having the text of the
I'm just learning |
@jeffkimbrel I don't think think we want to move in the docstrings direction. IMO it's better to stick to existing |
Agreed that it would be best to hold off on making docstrings a part of the API. Perhaps one day R will support formal annotations. Until then, I think we follow S4 by deciding on an alias convention that is eventually enforced by |
Printing a generic currently shows you the syntax to call each of its methods; it will be easy to adapt that to show how to find docs instead/as well. |
No description provided.
The text was updated successfully, but these errors were encountered: