Duncan Murdoch wrote:
> On 3/19/2009 2:30 PM, Li, Xuejun wrote:
>> Hello everyone,
>>
>>  
>>
>> Can anyone give me some hint/suggestion for unzipping a file in R?  The
>> help file for "zip.file.extract" function seems to be difficult to
>> understand. 
>>  
>>
>> For example, the name of my zip file is "refGene.txt.gz", which is
>> located in "C:\Documents and Settings\Desktop\test1".  I would like to
>> unzip this file to the same directory.
>
> That seems fairly unlikely to be a zip file; it looks like a gzip
> file, based on the extension.
>
> zip.file.extract is for zip archives.  The closest equivalent in the
> gzip world is a .tar.gz file.
>
> I don't know if there is a built-in gunzip function, but you can call
> a system function using system().
>

see gzip in R.utils.  admitedly, it's help page is quite informative, as
opposed to that for zip.file.extract.

vQ

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to