未导出的 Rd
Rd created without export
我正在记录一个内部的、非导出的函数。 roxygen2 正在创建一个 Rd 文件,即使文档中没有 @export
标记。 roxygen2 为以下文档创建了一个 Rd 文件。我错过了什么?
#' 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")
}
}
使用@noRd
.
Use the @noRd tag to prevent .Rd files from being generated.
我也喜欢标记它们 #' @keywords internal
,其中(根据 vignettes):
@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.
我正在记录一个内部的、非导出的函数。 roxygen2 正在创建一个 Rd 文件,即使文档中没有 @export
标记。 roxygen2 为以下文档创建了一个 Rd 文件。我错过了什么?
#' 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")
}
}
使用@noRd
.
Use the @noRd tag to prevent .Rd files from being generated.
我也喜欢标记它们 #' @keywords internal
,其中(根据 vignettes):
@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.