问题描述
我想在R包装饰图案中使用H2O,但这样做时遇到devtools::check()
和devtools::build()
的问题。小插图本身没有问题,可以正确编织并使用devtools::build_vignettes()
正确构建。
将数据读入H2O时,H2O会写入一个临时文件以从R中导出数据并读入JAVA。我相信,这是一个问题,因为在检查和构建程序包时,两个函数都报告我没有权限打开与临时命令中文件的连接(请参见下面的代码)。该支票记录在Hadley Wickham和Jennifer Bryan的R包装书here中。
我尝试将本地TMPDIR
项目文件中的环境变量.Renviron
设置为其他目录,但没有成功。
我创建了一个minimal reproducible example on GitHub,这是一个非常基本的R包h2oVignette
,其中包含使用H2O的小插图。克隆此程序包时,应该获得与我相同的错误(在Windows上)。
这是devtools::check()
的输出:
> devtools::check()
-- Building ----------------------------------------------------- h2oVignette --
Setting env vars:
* CFLAGS : -Wall -pedantic -fdiagnostics-color=always
* CXXFLAGS : -Wall -pedantic -fdiagnostics-color=always
* CXX11FLAGS: -Wall -pedantic -fdiagnostics-color=always
--------------------------------------------------------------------------------
√ checking for file 'C:\Users\Roel.Verbelen\Documents\GitHub\h2oVignette/DESCRIPTION' (1.4s)
- preparing 'h2oVignette': (716ms)
√ checking DESCRIPTION Meta-@R_566_4045@ion ...
- installing the package to build vignettes
- creating vignettes ...Warning in file(con,"r") : (22.7s)
cannot open file 'C:/Users/ROEL~1.VER/AppData/Local/Temp\RtmpqIoM47\xshell3fb464c913': Permission denied
Error in file(con,"r") : cannot open the connection
Execution halted
Error in (function (command = NULL,args = character(),error_on_status = TRUE,:
System command 'Rcmd.exe' Failed,exit status: 1,stdout + stderr:
E> * checking for file 'C:\Users\Roel.Verbelen\Documents\GitHub\h2oVignette/DESCRIPTION' ... OK
E> * preparing 'h2oVignette':
E> * checking DESCRIPTION Meta-@R_566_4045@ion ... OK
E> * installing the package to build vignettes
E> * creating vignettes ...Warning in file(con,"r") :
E> cannot open file 'C:/Users/ROEL~1.VER/AppData/Local/Temp\RtmpqIoM47\xshell3fb464c913': Permission denied
E> Error in file(con,"r") : cannot open the connection
E> Execution halted
Type .Last.error.trace to see where the error occured
devtools::build()
的输出:
> devtools::build()
√ checking for file 'C:\Users\Roel.Verbelen\Documents\GitHub\h2oVignette/DESCRIPTION' (1.1s)
- preparing 'h2oVignette': (801ms)
√ checking DESCRIPTION Meta-@R_566_4045@ion ...
- installing the package to build vignettes
- creating vignettes ...Warning in file(con,"r") : (23.5s)
cannot open file 'C:/Users/ROEL~1.VER/AppData/Local/Temp\Rtmp6B3dX9\xshell3df830451515': Permission denied
Error in file(con,"r") :
E> cannot open file 'C:/Users/ROEL~1.VER/AppData/Local/Temp\Rtmp6B3dX9\xshell3df830451515': Permission denied
E> Error in file(con,"r") : cannot open the connection
E> Execution halted
Type .Last.error.trace to see where the error occured
高度赞赏有关如何避免这些权限错误的任何指导。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)