[英]Use roxygen2 to document multiple datasets in a single documentation object
我正在寻找等效的@describeIn
,它将允许我为多个 R 数据对象创建单个文档对象。
我曾希望是这样的:
#' Tree Distances
#'
#' These datasets contain the distances between sets
#' of 10-tip, 11-tip and 12-tip trees.
#'
#' @name treeDistances
#' @keywords datasets
"treeDistances10"
"treeDistances11"
"treeDistances12"
将生成一个适用于所有三个treeDistances##
对象的手册页,类似于使用@describeIn treeDistances Distances between 11-tip trees
来描述另一个函数中的一个函数。
我注意到添加@aliases treeDistance11 treeDistance12
将文档页面与数据对象相关联,但没有引用使用部分中的对象 - 但我相信有更合适的方法来做到这一点?
使用@rdname
:
#' Tree Distances
#'
#' These datasets contain the distances between sets
#' of 10-tip, 11-tip and 12-tip trees.
#' @name treeDistances
#' @keywords datasets
"treeDistances10"
#' @rdname treeDistances
"treeDistances11"
#' @rdname treeDistances
"treeDistances12"
按照 antoine-sac 的 r-pkgs.had.co.nz/man.html#multiple-man 链接,正确的格式是:
#' Tree Distances
#'
#' These datasets contain the distances between sets
#' of 10-tip, 11-tip and 12-tip trees.
#'
#' @name treeDistances
#' @keywords datasets
NULL
#' @rdname treeDistances
"treeDistances10"
#' @rdname treeDistances
"treeDistances11"
#' @rdname treeDistances
"treeDistances12"
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.