Closed dmcglinn closed 7 years ago
Have you tried just reading it directly with readOGR
? Sometimes that works well. Otherwise I suggest putting the file on the server and using the following command from the terminal unzip myfile.gz
where myfile.gz
is the name of the file you are trying to unzip.
So if I try unzip
in the terminal, it says that it can't find or open the file, and if I try the unzip
function in the console it says error 1 in extracting from zip file. readOGR
also doesn't work when I use the usual shapefile format readOGR(dsn = "./data", layer = "myfile")
. There might be a way to make it work with gz, I just don't know how to format it for that and ?readOGR
didn't mention gz
I figured it out, I had to use untar('./data/polygon/temperature.gz', compressed = "gzip")
and it extracts it to the directory
nice!
On Fri, Aug 4, 2017 at 3:14 PM, EmmalineSheahan notifications@github.com wrote:
I figured it out, I had to use untar('./data/polygon/temperature.gz', compressed = "gzip") and it extracts it to the directory
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/mcglinnlab/shark-ray-div/issues/9#issuecomment-320331318, or mute the thread https://github.com/notifications/unsubscribe-auth/ABIp7Y7zmv0pVWFHuQMpRl4kUqyuaaHsks5sU22ZgaJpZM4OuB-e .
-- Daniel J. McGlinn, PhD Assistant Professor College of Charleston Department of Biology Harbor Walk West, rm 203 360 Concord Street Charleston, SC 29401 http://mcglinn.web.unc.edu/ office: 843-953-0190 cell: 405-612-1780
From Emmaline