【问题标题】:Devtools Document throwing ErrorDevtools 文档抛出错误
【发布时间】: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: 真的,谢谢

标签: r devtools


【解决方案1】:

当我在自己的包裹中遇到这个问题时,这似乎是一个工作流程问题。尝试在document() 之前运行use_data(charges_ay),或者在数据生成文件的末尾添加use_data(charges_ay)

【讨论】:

    猜你喜欢
    • 2016-12-14
    • 1970-01-01
    • 2021-12-02
    • 2020-09-01
    • 2020-08-17
    • 2021-10-13
    • 2021-12-17
    • 2021-01-13
    • 1970-01-01
    相关资源
    最近更新 更多