I am trying to download a zip file from the google patent bulk data website http://storage.googleapis.com/patents/grantbib/2014/ipgb20140107_wk01.zip, unzip the file and read the table. I used this procedure Using R to download zipped data file, extract, and import data
setwd("/var/folders/gk/n1wfrbqx6ss4x3vz7qp9lf3c0000gn/T//RtmpG7LUSs")
temp <- tempfile()
download.file("http://storage.googleapis.com/patents/grantbib/2014/ipgb20140107_wk01.zip",temp)
data <- read.table(unz(temp, "ipgb20140107_wk01.dat"))
unlink(temp)
and I tried to set the working directory to the same place as the temporary file similar to what is suggested in here Getting error in file(file, "rt"): cannot open the connection but I still get the same error message:
Error in open.connection(file, "rt") : cannot open the connection
In addition: Warning message:
In open.connection(file, "rt") :
cannot locate file 'ipgb20140107_wk01.dat' in zip file '/var/folders/gk/n1wfrbqx6ss4x3vz7qp9lf3c0000gn/T//RtmpG7LUSs/file476796049c7'