简体   繁体   English

R write_ods函数发回状态127

[英]R write_ods function send back status 127

I try to write ods file using R , with the readODS package. 我尝试使用带有readODS包的R来编写ods文件。 It is working fine on a computer, on another, with the same code, I get : 它在计算机上正常工作,在另一台计算机上使用相同的代码,我得到:

Warning message:
running command '"zip" -r9X "test.ods" "content.xml" "META-INF" "meta.xml" "mimetype" "styles.xml" ' had status 127

My code is : 我的代码是:

library(readODS)
write_ods(cars,path)

What should I do ? 我该怎么办 ? I figure I have to install a zip command, but what is this ? 我想我必须安装一个zip命令,但这是什么?

I had the same error with the readODS::write_ods() function. 我在readODS::write_ods()函数中遇到了同样的错误。
It came from the fact that zip command was not recognized on my system. 它来自于我的系统无法识别zip命令的事实。
First of all, here is my sessionInfo() : 首先,这是我的sessionInfo()

R version 3.3.3 (2017-03-06) R版本3.3.3(2017-03-06)
Platform: x86_64-w64-mingw32/x64 (64-bit) 平台:x86_64-w64-mingw32 / x64(64位)
Running under: Windows 7 x64 (build 7601) Service Pack 1 运行于:Windows 7 x64(内部版本7601)Service Pack 1

I solved this error installing Rtools on my computer: check if Rtools is installed. 我解决了在我的计算机上安装Rtools错误:检查是否安装了Rtools If not, you can download it here : https://cran.r-project.org/bin/windows/Rtools/ 如果没有,您可以在此处下载: https//cran.r-project.org/bin/windows/Rtools/
In my case, Rtools is installed in C:\\RBuildTools\\3.4\\ . 就我而言, Rtools安装在C:\\RBuildTools\\3.4\\ In this directory, one can find a bin subdirectory with zip.exe inside. 在这个目录中,可以找到一个带有zip.exebin子目录。 Finally, I added C:\\RBuildTools\\3.4\\bin\\ to the PATH environment variable, and readODS::write_ods() works fine ! 最后,我将C:\\RBuildTools\\3.4\\bin\\PATH环境变量, readODS::write_ods()工作正常!

I hope that it will help you. 我希望它会对你有所帮助。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM