【问题标题】:roxygen2 not documenting a new projectroxygen2 没有记录新项目
【发布时间】:2020-05-19 19:45:32
【问题描述】:

我正在尝试使用roxygen2 记录一个新的 R 项目。我正在使用roxygen2 6.1.1 版和desc 1.2.0 版。

我已经尝试了roxygen2::roxygenise()devtools::document() 这两个命令,但在这两种情况下我都遇到了同样的错误:

Updating documentation 
First time using roxygen2. Upgrading automatically... 
Error in if (any(mismatch <- res != res2)) { : missing value where TRUE/FALSE needed

我查看了以下问题:roxygen new project issue 并尝试按照重新安装 roxygen 和 desc 的建议进行操作,但无济于事。

任何帮助将不胜感激

【问题讨论】:

  • 它告诉你你的代码有错误。您可能需要将该行更改为if (any(res != res2)),但我没有完整的代码,因此无法完全确定。修复错误(以及可能弹出的其他错误)后,它会让您继续。
  • @rpolicastro 那不是我的 roxygen2 代码。请参阅问题中链接的倒数第二条评论。该用户遇到了同样的错误

标签: r roxygen2


【解决方案1】:

检查您的说明文件中的空行。

Authors@R: 
    person(given = "First",
           family = "Last",
           role = c("aut", "cre"),
           email = "first.last@example.com",
           comment = c(ORCID = "YOUR-ORCID-ID"))
                                                       <- this line is blank, remove!
Description: What the package does (one paragraph).

这解决了我的问题。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-03-22
    • 1970-01-01
    • 2018-09-16
    • 1970-01-01
    • 2011-11-04
    • 2016-10-31
    • 1970-01-01
    • 2015-06-25
    相关资源
    最近更新 更多