【发布时间】:2016-07-12 03:43:36
【问题描述】:
我正在整理一个 R 数据包,并且我一直在记录数据集,直到现在都没有问题。以下内容包含在一个名为 charges_ay.R 的文件中,该文件位于包 repo 的 R 文件夹中。
#' Student Charges for Academic Year programs.
#'
#' For more information, download a data dictionary from the IPEDS website.
#'
#' Survey years 2002 - 2014.
#'
#' @source http://nces.ed.gov/ipeds/datacenter/DataFiles.aspx
#' @format Data frame with columns
"charges_ay"
当我尝试从包的基础运行devtools::document 时(就像我对其他文件一样),我收到以下错误:
> devtools::document()
Updating ripeds documentation
Loading ripeds
Error: 'charges_ay' is not an exported object from 'namespace:ripeds'
鉴于到目前为止一切正常,我有点困惑,因为流程和文件文档都是一样的。
任何帮助将不胜感激!
【问题讨论】:
-
为了安全起见,请尝试将
@name和@usage字段添加到文档中。它可能是问题的根源,但无论如何,它只会有帮助。 -
数据是否存在?您的说明文件中有
LazyData: TRUE吗?如果您使用devtools::use_data(),我认为这些会自动添加 -
@Jemus42 这是个坏建议
-
@Jemus42 谢谢,我添加了那些但没有骰子。但是,我确实以 NULL 结束,这似乎有效,但不确定该文件与其他文件相比有何不同。
-
@rmflight 我有 LazyData: 真的,谢谢