Skip to content

Commit

Permalink
fix noRd tag thanks @mikeroswell cf #120
Browse files Browse the repository at this point in the history
  • Loading branch information
maelle committed Jul 14, 2020
1 parent 56b94b4 commit c18afe8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions content/post/2019-12-12-internal-functions/index.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
4 changes: 2 additions & 2 deletions content/post/2019-12-12-internal-functions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit c18afe8

Please sign in to comment.