[R] Re: Unzip gz files in R under Windows

Peter Dalgaard BSA p.dalgaard at biostat.ku.dk
Tue Apr 29 21:09:04 CEST 2003


John Zhang <jzhang at jimmy.harvard.edu> writes:

> I tried zip.unpack to unzip a gz file under Windows and got "error 1 in 
> extracting from zip file". Did I do something wrong or is there a better way of 
> unziping a gz file in Windows? The gz file is fine as I could unzip it visually 
> throught Windows. Thanks.

It's not a ZIP file though. Some popular Windows programs will unpack
many different compressed formats, but zip.unpack will only do the
true ZIP format. To unpack a .gz file you need the gunzip program (or
gzip with suitable option). Notice that R can read gz files using a
(surprise...) gzfile() connection.

-- 
   O__  ---- Peter Dalgaard             Blegdamsvej 3  
  c/ /'_ --- Dept. of Biostatistics     2200 Cph. N   
 (*) \(*) -- University of Copenhagen   Denmark      Ph: (+45) 35327918
~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk)             FAX: (+45) 35327907



More information about the R-help mailing list