[R] how to read/save .zip compressed files from R?
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Aug 3 20:27:23 CEST 2010
See also Omegahat package Rcompression (a copy of which for Windows is
on CRANextras).
But I would do this via unzip, modify, zip
On Tue, 3 Aug 2010, Jeff Newmiller wrote:
> In the way you describe it, no.
>
> A) There is no such thing as a "zip folder". You are most likely
> being fooled by the visual presentation of zip files in Windows
> Explorer, which automatically simulates it as a folder, when it is
> really extracting bits of data as needed to display it.
>
> B) Because the data must be decompressed to be manipulated, there is
> no performance or disk space advantage to creating a facility such
> as you describe, though thee may be a convenience factor if you do
> it a lot.
>
> C) There is a function zip.file.extract() in R for extraction, but I
> don't see a zip compression function, so you will need to use
> external programs, perhaps executed using the "system" function, to
> generate updated zip files.
You both missed utils::unzip.
> D) It is almost always a bad idea to overwrite your original data,
> since this prevents you from retracing your data processing steps
> later for verification or debugging purposes.
>
> J.delasHeras at ed.ac.uk wrote:
>
>>
>> Dear list,
>>
>> is there a way to open a .zip folder so that one can extract and
>> modify files inside and then save teh .zip folder again?
>>
>> thanks!
>>
>> Jose
>>
>> --
>> Dr. Jose I. de las Heras Email: J.delasHeras at ed.ac.uk
>> The Wellcome Trust Centre for Cell Biology Phone: +44 (0)131 6507095
>> Institute for Cell & Molecular Biology Fax: +44 (0)131 6507360
>> Swann Building, Mayfield Road
>> University of Edinburgh
>> Edinburgh EH9 3JR
>> UK
>> *********************************************
>> Alternative email: nach.mcnach at gmail.com
>> *********************************************
>>
>> --
>> The University of Edinburgh is a charitable body, registered in
>> Scotland, with registration number SC005336.
>>
>> ______________________________________________
>> R-help at 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.
>
> ---------------------------------------------------------------------------
> Jeff Newmiller The ..... ..... Go Live...
> DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
> Live: OO#.. Dead: OO#.. Playing
> Research Engineer (Solar/Batteries O.O#. #.O#. with
> /Software/Embedded Controllers) .OO#. .OO#. rocks...1k
> ---------------------------------------------------------------------------
> Sent from my phone. Please excuse my brevity.
>
> ______________________________________________
> R-help at 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.
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list