有人可以提供一个如何正确使用模板标签的例子Roxygen2
。我试图做最明显的事情(对我来说):
在我的packageName-package.R
文件中:
#' [... other Roxygen blocks ...]
#'
#' @templateVar testTemplateTag Testing one two
NULL
然后在一个文件中 someFunction.R
#' [... other Roxygen blocks ...]
#'
#' @template testTemplateTag
我得到错误:
Error : Can not find template testTemplateTag
我试图有一个地方来记录常见的重复定义示例等。当这些东西嵌套在我一直在使用的一组函数中时@inheritParms
。但是有些东西,如定义和其他描述,在几个地方使用。我已经搜索了高和低的使用@template
and@templateVar
并没有找到任何东西。
谢谢。