r - 使用 roxygen2 在单个文档对象中记录多个数据集

标签 r dataset documentation documentation-generation roxygen2

我正在寻找一个等价于 @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 将文档页面与数据对象相关联,但没有引用 Usage 部分中的对象——但我相信有更合适的方法来做到这一点?

最佳答案

使用@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"

关于r - 使用 roxygen2 在单个文档对象中记录多个数据集,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57390342/

相关文章:

c# - 将 SQL 读取到 DataSet 到 XmlDocument

php - PHPdoc @param 中的两种或多种数据类型

从给定 X 值的密度函数中检索 Y 值

python - 如何使用数据集 API 将迭代器的输出映射到 Tensorflow 损失函数中的占位符

r - 如何从函数调用中提取公式和子集信息

python - 如何根据索引值操作数据集?

javascript - 为什么 JavaScript 函数文档位于函数之外?

documentation - 记录 Rebol 的方言

通过链接读取文件

r - 旋转数据框列表并合并它们