From f66f68c8103c42300c4a35643b9aaf647d9d1f26 Mon Sep 17 00:00:00 2001 From: olivroy <52606734+olivroy@users.noreply.github.com> Date: Fri, 23 Feb 2024 09:01:04 -0500 Subject: [PATCH] Update advice on S3 --- vignettes/rd-other.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vignettes/rd-other.Rmd b/vignettes/rd-other.Rmd index 372de6a8..d646e1c2 100644 --- a/vignettes/rd-other.Rmd +++ b/vignettes/rd-other.Rmd @@ -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.