From c18afe8ddb36b80f49237c3ba8d4e3ba4cfe6ae1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ma=C3=ABlle=20Salmon?= Date: Tue, 14 Jul 2020 12:37:02 +0200 Subject: [PATCH] fix noRd tag thanks @mikeroswell cf #120 --- content/post/2019-12-12-internal-functions/index.Rmd | 4 ++-- content/post/2019-12-12-internal-functions/index.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/content/post/2019-12-12-internal-functions/index.Rmd b/content/post/2019-12-12-internal-functions/index.Rmd index 839e7c71..5faa5ee2 100644 --- a/content/post/2019-12-12-internal-functions/index.Rmd +++ b/content/post/2019-12-12-internal-functions/index.Rmd @@ -63,12 +63,12 @@ Another possible approach to helper functions when used in several packages is t ### How to document internal functions? -You should at least add a few comments in their code as usual. Best practice recommended in the [tidyverse style guide](https://style.tidyverse.org/documentation.html#internal-functions) and the [rOpenSci dev guide](https://devguide.ropensci.org/building.html) is to document them with roxygen2 tags like other functions, but to use `#' @NoRd` to prevent manual pages to be created. +You should at least add a few comments in their code as usual. Best practice recommended in the [tidyverse style guide](https://style.tidyverse.org/documentation.html#internal-functions) and the [rOpenSci dev guide](https://devguide.ropensci.org/building.html) is to document them with roxygen2 tags like other functions, but to use `#' @noRd` to prevent manual pages to be created. ```r #' Compare x to 1 #' @param x an integer -#' @NoRd +#' @noRd is_one <- function(x) { x == 1 } diff --git a/content/post/2019-12-12-internal-functions/index.md b/content/post/2019-12-12-internal-functions/index.md index 3450f731..60afd6cf 100644 --- a/content/post/2019-12-12-internal-functions/index.md +++ b/content/post/2019-12-12-internal-functions/index.md @@ -87,12 +87,12 @@ Another possible approach to helper functions when used in several packages is t ### How to document internal functions? -You should at least add a few comments in their code as usual. Best practice recommended in the [tidyverse style guide](https://style.tidyverse.org/documentation.html#internal-functions) and the [rOpenSci dev guide](https://devguide.ropensci.org/building.html) is to document them with roxygen2 tags like other functions, but to use `#' @NoRd` to prevent manual pages to be created. +You should at least add a few comments in their code as usual. Best practice recommended in the [tidyverse style guide](https://style.tidyverse.org/documentation.html#internal-functions) and the [rOpenSci dev guide](https://devguide.ropensci.org/building.html) is to document them with roxygen2 tags like other functions, but to use `#' @noRd` to prevent manual pages to be created. ```r #' Compare x to 1 #' @param x an integer -#' @NoRd +#' @noRd is_one <- function(x) { x == 1 }