我正在尝试记录 r-package 的数据集,如下所示 http://r-pkgs.had.co.nz/data.html#documenting-data 。每个数据都包含在单个向量中,我在每个 data1.R
中编写了如下内容:
#' #' @format A single vector with one column: #' @examples #' \dontrun{ #' data1 #' } "data1"
Them, I puted each document ".R" files in the folder mypackage/R
. But, when I submeted for CRAN, their reported the follows warning:
Undocumented code objects:
‘data1’ ‘data2’ ‘data3’ ‘data4’ ‘data5’ ‘data6’
Undocumented data sets:
‘data1’ ‘data2’ ‘data3’ ‘data4’ ‘data5’ ‘data6’
我做错了什么?
最佳答案
应记录所有包对象以避免警告。
您应该启动:
devtools::document(roclets = c('rd', 'collate', 'namespace'))
生成与您的数据集关联的 .Rd 文件
关于r - 如何记录 r 包的数据集?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62490711/