报错状态:
Error: zipping up workbook failed. Please make sure Rtools is installed or a zip application is available to R.
Try installr::install.rtools() on Windows. If the "Rtoolsin" directory does not appear in Sys.getenv("PATH")
Try installr::install.rtools() on Windows. If the "Rtoolsin" directory does not appear in Sys.getenv("PATH")
please add it to the system PATH or set this within the R session with Sys.setenv("R_ZIPCMD" = "path/to/zip.exe")
错误原因:缺少个zip.exe的程序,就在RTools里面
解决办法:
1,下载并安装RTools.exe,选最新的下载,安装结束时勾选把路径写入系统环境变量,下载地址 or 地址
2,找到zip.exe路径(主要缺的就是这个程序),RTools安装路径下找到bin,如D:/Program/Rtools/bin/zip.exe
3,运行代码,仍报错,则在R中运行如下把路径写入环境变量:Sys.setenv(R_ZIPCMD= "D:/Program/Rtools/bin/zip.exe")
4,Perfect,(乛◡乛)
话余:openxlsx包真的非常棒,读起来速度快,格式要求也简单,非常推荐处理xlsx,xls转为xlsx再处理;尤其是大文件上百MB,也是目前遇到最快的,才疏学浅更好的包,还请推荐m(__)m。
REF: