From d1d3b33fcb588a6f7fa2d74429043a9570404a11 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 27 Nov 2024 23:09:28 -0800 Subject: [PATCH 1/2] Grammar: technically correctly->correct --- vignettes/namespace.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/namespace.Rmd b/vignettes/namespace.Rmd index 002a52dd..06f80dba 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. From 80a3440d1bad5be0ec08f2d19a0731f99c06bba7 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Wed, 27 Nov 2024 23:10:41 -0800 Subject: [PATCH 2/2] 'place holder' -> placeholder --- vignettes/namespace.Rmd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vignettes/namespace.Rmd b/vignettes/namespace.Rmd index 06f80dba..ccc96f9a 100644 --- a/vignettes/namespace.Rmd +++ b/vignettes/namespace.Rmd @@ -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.