I'm documenting an internal, non-exported function. roxygen2 is creating an Rd file even though there is no @export tag in the documentation. roxygen2 created an Rd file for the following documentation. What am I missing?
#' Check validity of a
#' @param a A logical value
arg_check_a = function(a) {
if (!is.logical(a)) {
stop("a must be a logical value")
}
}
Use @noRd.
Use the @noRd tag to prevent .Rd files from being generated.
I'm also a fan of marking them #' @keywords internal, which (according to the vignettes):
@keywords internalis 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.
(Most of this is derived from https://github.com/r-lib/roxygen2/issues/684)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With