【发布时间】:2019-02-19 05:33:56
【问题描述】:
使用 devtools::release() 发布包 我对使用 devtools::check() 确保包正确构建的部分有疑问。
使用托管在https://github.com/RobWHickman/ggparliament 的 gihtub 上的包代码。在各种 Windows 机器上都有同样的错误。还没有机会在 linux 上进行检查。
我在通过 devtools::release 的拼写检查部分后得到的错误是(包名称是 ggparliament,路径本身已经在这里编辑但正确):
Is documentation free of spelling errors? (you can ignore false positives)
1: Yes
2: No way
3: Nope
Selection: 1
Building and checking ggparliament ==================================================================================================
Updating ggparliament documentation
Loading ggparliament
Error in file(con, "r") : cannot open the connection
In addition: Warning messages:
1: In normalizePath(path.expand(path), winslash, mustWork) :
path[11]="C:\Users\my\path\ggparliament/R/draw_majoritythreshold.R ": The filename, directory name, or volume label syntax is incorrect
2: In normalizePath(path.expand(path), winslash, mustWork) :
path[11]="C:\Users\my\path\ggparliament\R\draw_majoritythreshold.R ": The filename, directory name, or volume label syntax is incorrect
3: In file(con, "r") :
cannot open file 'C:\Users\my\path\ggparliament\R': Permission denied
正如我所提到的,当使用 devtools::check() 检查包时,我遇到了同样的错误,但如果我使用 rstudio 快捷键 Ctrl+Shift+E 它会起作用,我相信它会做同样的事情。
非常感谢任何帮助!
【问题讨论】:
-
是的 github.com/RobWHickman/ggparliament 只是为 CRAN 提交而构建
-
当您运行
devtools::check()和devtools::release()时,是这样完成的(即没有覆盖参数默认值),还是以类似于devtools::check("path/to/ggparliament")的方式完成? -
无参数运行。也刚刚检查了
devtools::check("C:/full/path/to/package/ggparliament"),它给出了同样的错误 -
full/path/to/package有空格吗?如果有,可能与this issue filed on GitHub有关 -
很确定不在我尝试过的任何机器上。当前我打开的是
C:\Users\Alaa\Desktop\ggparliament(直接从Windows文件资源管理器复制,因此反斜杠)