keywords internal vs noRd

In using roxygen2, what is the difference, if any, between the effect of tagging a function with 'keywords internal' and that of tagging it with 'noRd'?

1 Like

Keyword internal means there will be a manual page for the function but it won't be in the documentation index. https://roxygen2.r-lib.org/articles/rd.html#indexing " @keywords internal is useful because it removes the function from the documentation index; it’s useful for functions aimed primarily at other developers, not typical users of the package."

@NoRd means there won't even be a manual page so the roxygen2 doc of that function only lives in the R script.

We at rOpenSci recommend not having manual pages for internal functions in https://devguide.ropensci.org/building.html " Add #' @noRd to internal functions". It is also recommended in https://style.tidyverse.org/documentation.html#internal-functions

3 Likes

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.