我有一个非常大的zip文件,我试图把它读成R没有解压它像这样:R正在读取一个压缩数据文件,而无需解压就
temp <- tempfile("Sales", fileext=c("zip"))
data <- read.table(unz(temp, "Sales.dat"), nrows=10, header=T, quote="\"", sep=",")
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") :
cannot open zip file 'C:\Users\xxx\AppData\Local\Temp\RtmpyAM9jH\Sales13041760345azip'
这篇文章可以帮助你:http://stackoverflow.com/questions/3053833/using-r-to-download-zipped-data-file-extract-and-import-data – Sam
是的,我做了我尽职调查和搜查之前,我问这个问题,稍微不同的是,我想从我的本地文件系统读取,而不是通过一个URL。 – laiboonh
你曾经解决过这个问题吗? –