I have the following code:
download.file(
"http://www.wikipathways.org//wpi/batchDownload.php?species=Homo%20sapiens&fileType=txt",
destfile="human.zip")
files <- unzip( "human.zip", list=T)
It works on Linux, but throws the following error on Windows:
Error in unzip("human.zip", list = T) :
error -103 with zipfile in unzGetCurrentFileInfo
Do you happen to know what's the problem?
In
?download.file
, we read that:Note that this list does not include
.zip
, although it is a binary file type. So you need to passmode="wb"
.I cannot reproduce your example, but it solved my identical problem. Here is an example: