diff --git a/vignettes/namespace.Rmd b/vignettes/namespace.Rmd index 002a52dd..ccc96f9a 100644 --- a/vignettes/namespace.Rmd +++ b/vignettes/namespace.Rmd @@ -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. @@ -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.