Skip to content
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

Update advice on S3 #1596

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions vignettes/rd-other.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ Some notes:

- It is your choice whether or not to document S3 **methods**.
Generally, it's not necessary to document straightforward methods for common generics like `print()`.
(You should, however, always `@export` S3 methods).
(You should, however, always `@export` S3 methods, even internal ones).

If your method is more complicated, you should document it by setting `@rdname` or `@describeIn`.
For complicated methods, you might document in their own file (i.e. `@rdname generic.class`; for simpler methods you might document with the generic (i.e. `@describeIn generic)`.
For complicated methods, you might document in their own file (i.e. `@name generic.class`; for simpler methods you might document with the generic (i.e. `@rdname generic)`.
Learn more about these tags in `vignette("reuse")`.

- Generally, roxygen2 will automatically figure out the generic that the method belongs to, and you should only need to use `@method` if there is ambiguity.
Expand Down
Loading