[英]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.