我正在使用 roxygen 生成 R 文档,除了添加此示例之外,一切都运行良好
@example dIconTr(c(c(1:2), NA)) and the answe is TRUE, dIconTr(c(1:2)) and the answer is FALSE
错误信息是:
cannot open file '/Users/myname/Documents/work/Development_Package/mypackage/dIconTr(c(c(1:2), NA)) and the answe is TRUE, dIconTr(c(1:2)) and the answer is FALSE': No such file or directory
Execution halted
Exited with status 1
当我删除该条目,the example
条目,一切正常,我可以构建包并将其提交到 git 存储库并发布它
你能帮忙吗?
更新 1:在第一个答案之后,我将示例更改为:
#' @example doesItContainNullValues(c(1:2))
#' doesItContainNullValues(c(c(1:3), NA))
我在 R studio 中没有收到错误,但是当我提交到 git repositry 时,所有函数的所有文档都已损坏,现在我收到此错误
Error in fetch(key) : lazy-load database 'C:/Users/myname/Documents/R/win-library/3.1/mypackage/help/mypackage.rdb' is corrupt