Reputation: 555
I am trying to unzip a .zip of Formula 1 data from this website using the following code:
dat <- unzip(zipfile = "http://ergast.com/downloads/f1db_csv.zip")
However, each time I do so I get the following error message:
error 1 in extracting from zip file
Can anybody tell me what I am doing wrong?
Upvotes: 0
Views: 130
Reputation: 37661
I think that unzip will only work with local files, not URLs. You can make this work by downloading first.
download.file("http://ergast.com/downloads/f1db_csv.zip", "f1db_csv.zip")
unzip("f1db_csv.zip")
Upvotes: 1