也许这是一件微不足道的事情,我只是在同一个代码中寻找太久......当getFLOSSmoleDataXML.R
通过 RStudio 采购 R 模块时,代码正确检测目录中的 .Rdata 文件cache
并跳过下载和解析阶段。另一方面,当 R 通过 GNU make
( sudo -u ruser make
) 处理相同的模块时,结果很奇怪:
Rscript --no-save --no-restore --verbose getFLOSSmoleDataXML.R
running
'/usr/lib/R/bin/R --slave --no-restore --no-save --no-restore --file=getFLOSSmoleDataXML.R'
Loading required package: RCurl
Loading required package: methods
Loading required package: bitops
Loading required package: XML
Loading required package: digest
Verifying repository: FreeCode
Checking file "http://flossdata.syr.edu/data/fc/2013/2013-Dec/fcProjectAuthors2013-Dec.txt.bz2"...
rdataFile = "./cache/5802dbd08ebefadf70fbb826776f9f0f.Rdata"...
trying URL 'http://flossdata.syr.edu/data/fc/2013/2013-Dec/fcProjectAuthors2013-Dec.txt.bz2'
Content type 'application/x-bzip2' length 514960 bytes (502 Kb)
opened URL
==================================================
downloaded 502 Kb
Error in gzfile(file, "wb") : cannot open the connection
Calls: print ... FUN -> importRepoFiles -> lapply -> FUN -> save -> gzfile
In addition: Warning message:
In gzfile(file, "wb") :
cannot open compressed file './cache/5802dbd08ebefadf70fbb826776f9f0f.Rdata', probable reason 'No such file or directory'
Timing stopped at: 0.74 0.068 1.134
Execution halted
make[1]: *** [importFLOSSmole] Error 1
make[1]: Leaving directory `/home/ruser/diss-floss/import'
make: *** [collection] Error 2
ubuntu@ip-10-164-108-61:/home/ruser/diss-floss$ ls -l cache/5802*
-rw-r--r-- 1 ruser ruser 1968939 Feb 19 05:47 cache/5802dbd08ebefadf70fbb826776f9f0f.Rdata
正如您从最后两行看到的,我验证并确认该文件确实存在。这里发生了什么?有什么想法或建议吗?谢谢!