R CMD 检查抱怨 man 中的意外文件

发布于 2024-08-14 08:30:47 字数 321 浏览 2 评论 0原文

这听起来像是一个愚蠢的问题:我将我的 R 代码放入一个包中,并且 R CMD check src 抱怨 Emacs 生成的 .Rd~ 备份文件。

* checking package subdirectories ... WARNING
Subdirectory 'man' contains invalid file names:
  read.PI.Rd~ write.PI.Rd~

文档说:“此外,默认情况下会排除基本名称以“~”、“.bak”或“.swp”结尾的[...]文件[...]。«(页面18)。但为什么会出现警告呢?

this sounds like a silly problem: I'm putting my R code into a package and R CMD check src complains about the .Rd~ backup files being produced by Emacs.

* checking package subdirectories ... WARNING
Subdirectory 'man' contains invalid file names:
  read.PI.Rd~ write.PI.Rd~

the documentation says: »In addition [...] files [...] with base names [...] ending in ‘~’, ‘.bak’ or ‘.swp’, are excluded by default.« (page 18). but then why the warning?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

无人问我粥可暖 2024-08-21 08:30:47

只需添加一个文件 cleanup 即可将它们从顶级目录中删除。此外,您可以首先通过 R CMD build 构建 tarball 或 zip 存档,然后通过 R CMD check 检查此存档 - 这也应该跳过这些文件。

另外,你到底是如何调用R CMD check的,你的目录布局是什么?在 Linux 上使用 R 2.10.0 时,我刚刚为我的一个软件包运行了 touch pkg/man/foo.Rd~ ,并运行 R CMD check pkg (其中 pkg 是存储在 R-Forge 上的源项目常见的顶级目录)
没有发出您所看到的此警告。该文件未被 cleanup 删除,因为当前仅在 src 中清除。

Just add a file cleanup which removes them in your top-level directory. Also, you could build a tarball or zip archive first via R CMD build and the check this archive via R CMD check -- that should skip these filese as well.

Also, exactly how are you calling R CMD check, and what is your directory layout? With R 2.10.0 on Linux, I just ran touch pkg/man/foo.Rd~ for one of my packages, and R CMD check pkg (where pkg is the top-level directory as common for source projects stored on R-Forge)
did not issue this warning you are seeing. The file was not removed by cleanup as that currently purges only in src.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文