[R] zip.file.extract
Wacek Kusnierczyk
Waclaw.Marcin.Kusnierczyk at idi.ntnu.no
Thu Mar 19 20:41:53 CET 2009
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
More information about the R-help
mailing list