1 Nov 2008 12:09
Re: [Rd] Small modification of zip.file.extract in utils?
Martin Elff <elff <at> sowi.uni-mannheim.de>
2008-11-01 11:09:07 GMT
2008-11-01 11:09:07 GMT
On Thursday 30 October 2008 (20:08:27), Jon Olav Skoien wrote:
> Dear list,
>
> I needed to extract a zip-archive, and found zip.file.extract in utils.
> My only problem was the use of tempdir(), since I wanted to permanently
> extract the archive at a fixed location for later use. My own fix was
> simple, adding an extra parameter zipdir (without default), and within
> the function change
> tmpd <- tempdir()
> to
> tmpd = ifelse(missing(zipdir),tempdir(),zipdir)
>
> This modification could maybe be useful also for other users, unless
> there are some problems I am not aware of?
I had similar problems with 'zip.file.extract' and implemented
a function 'unzip' in my package 'memisc', which also works in a way that is
probably more comprehensible for end-users like me:
unzip package:memisc R Documentation
Extract Files from Zip Files
Description:
'unzip' extracts a file from a zip archive and puts them into a
directory specified by the user or into the temporary directory of
the current session.
Usage:
(Continue reading)
RSS Feed