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

Grammar fixes for namespace vignette #1687

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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/namespace.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ bizarro <- function(x, ...) {

While S3 methods are regular functions with a special naming scheme, their "export" works a bit differently.
S3 methods are exported only in the sense that calling the generic with the appropriate class will call the method; a user can't directly access the method definition by typing its name.
A more technically correctly term would be to say that the method is **registered** so that the generics can find it.
A more technically correct term would be to say that the method is **registered** so that the generics can find it.

You must register, i.e. `@export`, every S3 method regardless of whether or not the generic is exported.
roxygen2 will warn you if you have forgotten.
Expand Down Expand Up @@ -187,7 +187,7 @@ This is automated by `usethis::use_import_from()`.
NULL
```

Note the use of `NULL` here: you must provide something for roxygen2 to document, so we use `NULL` as place holder.
Note the use of `NULL` here: you must provide something for roxygen2 to document, so we use `NULL` as placeholder.

It is possible, but not generally recommended to import all functions from a package with `@import package`.
This is risky if you import functions from more than one package, because while it might be ok today, in the future the packages might end up with a function having the same name, and your users will get a warning every time your package is loaded.
Expand Down
Loading