将R包提交到CRAN时,指定了“LazyData”而没有“data”目录错误

当我在本地对我的包运行 devtools::check 时,我没有收到此错误,但是当我将我的包提交到 CRAN 或运行 devtools::check_win_devel 时,我收到此错误:

'LazyData' 没有指定 'data' 目录

大约一周前,我成功地将我的包提交给了 CRAN,但没有收到此错误,我更改的只是描述文件。

回答

随着时间的推移,策略设置会发生变化。更改首先在 r-devel 中实现,这就是您在 win_devel 中看到的原因。

这个特殊的变化……是上周添加的。了解此类更改的一种方法是关注此处自动生成的更改“博客”
https://developer.r-project.org/blosxom.cgi/R-devel/NEWS

实际上,本周末我刚刚在这个问题上帮助了一位朋友,并从我使用的 Feedly RSS 提要阅读器中截取了此屏幕截图:

(下划线是我们可以忽略的格式化伪像)。

但简而言之,您需要检查 r-devel,并且您实际上每次上传时都向 CRAN 承诺🙂

  • There is quite a bit of documentation on this but in short if you package _has no data accessed via the `data()` command_ then you also have no `data/` directory, and hence need to `LazyData:...` entry. Maybe I am overlooking something here but I think you really should just delete the one offending line from `DESCRIPTION`.
  • I missed a word or two there: "hence NO need to [have a] LazyData: entry". But why don't you just remove the line as suggested (just as a test), and see how that package fares at win-builder?

回答

我删除了该行

懒惰数据:真

从我的描述文件


以上是将R包提交到CRAN时,指定了“LazyData”而没有“data”目录错误的全部内容。
THE END
分享
二维码
< <上一篇
下一篇>>