问题描述
我正在寻找一个等效的 @describeIn
,它将允许我为多个R数据对象创建一个文档对象.
I'm looking for an equivalent of @describeIn
that will allow me to create a single documentation object for multiple R data objects.
我希望是这样的:
#' 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在11个尖端的树之间的距离描述另一个函数中的一个功能
.
would produce a single manual page that would apply to all three treeDistances##
objects, similar to describing one function within another using @describeIn treeDistances Distances between 11-tip trees
.
我注意到,添加 @aliases treeDistance11 treeDistance12
会将文档页面与数据对象相关联,但未在用法"部分中引用这些对象–但是我相信有一种更合适的方法来执行此操作?
I notice that adding @aliases treeDistance11 treeDistance12
associates the documentation page with the data objects, but without referencing the objects in the Usage section – but I believe that there is a more appropriate way to do this?
推荐答案
使用 @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"
这篇关于使用roxygen2在单个文档对象中记录多个数据集的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!