R CMD 检查抱怨 man 中的意外文件
这听起来像是一个愚蠢的问题:我将我的 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
只需添加一个文件
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 viaR CMD build
and the check this archive viaR 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 rantouch pkg/man/foo.Rd~
for one of my packages, andR CMD check pkg
(wherepkg
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 insrc
.