From 9a5bbcd387928e5d4b0d924faaba827351a67ee0 Mon Sep 17 00:00:00 2001 From: Michael Chirico Date: Thu, 2 Nov 2023 06:25:13 -0700 Subject: [PATCH] Use plain markdown language tag for gated code over eval=FALSE (#1476) --- vignettes/namespace.Rmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vignettes/namespace.Rmd b/vignettes/namespace.Rmd index bcc0c39d..44051681 100644 --- a/vignettes/namespace.Rmd +++ b/vignettes/namespace.Rmd @@ -85,7 +85,7 @@ The `NAMESPACE` also controls which functions from other packages are made avail If you are using just a few functions from another package, we recommending adding the package to the `Imports:` field of the `DESCRIPTION` file and calling the functions explicitly using `::`, e.g., `pkg::fun()`. -```{r, eval = FALSE} +```r my_function <- function(x, y) { pkg::fun(x) * y } @@ -93,7 +93,7 @@ my_function <- function(x, y) { If the repetition of the package name becomes annoying you can `@importFrom` and drop the `::`: -```{r} +```r #' @importFrom pkg fun my_function <- function(x, y) { fun(x) * y